diff --git a/src/components/ImageGenDrawer.tsx b/src/components/ImageGenDrawer.tsx
index c03f2f5..739a3d5 100644
--- a/src/components/ImageGenDrawer.tsx
+++ b/src/components/ImageGenDrawer.tsx
@@ -28,7 +28,6 @@ interface ImageResponse {
}
export function ImageGenDrawer({ disableFactor }: Props) {
const ctx = useContext(AppContext);
- if (ctx === null) return <>>;
const [showGenImage, setShowGenImage] = useState(false);
const [imageGenPrompt, setImageGenPrompt] = useState("");
diff --git a/src/components/ImageUploadDrawer.tsx b/src/components/ImageUploadDrawer.tsx
index 9c6ed7d..79dd3bc 100644
--- a/src/components/ImageUploadDrawer.tsx
+++ b/src/components/ImageUploadDrawer.tsx
@@ -24,7 +24,6 @@ interface Props {
}
export function ImageUploadDrawer({ setImages, images, disableFactor }: Props) {
const ctx = useContext(AppContext);
- if (ctx === null) return <>>;
const [showAddImage, setShowAddImage] = useState(false);
const [enableHighResolution, setEnableHighResolution] = useState(true);
useState("b64_json");
diff --git a/src/components/ListAPI.tsx b/src/components/ListAPI.tsx
index d32a62a..5ae9600 100644
--- a/src/components/ListAPI.tsx
+++ b/src/components/ListAPI.tsx
@@ -118,7 +118,6 @@ function APIsDropdownList({
function ToolsDropdownList() {
const ctx = useContext(AppContext);
- if (!ctx) return
error
;
const { toast } = useToast();
const [open, setOpen] = React.useState(false);
@@ -189,7 +188,6 @@ function ToolsDropdownList() {
function ChatTemplateDropdownList() {
const ctx = useContext(AppContext);
- if (!ctx) return error
;
const { chatStore, setChatStore, templates } = ctx;
@@ -237,7 +235,6 @@ function ChatTemplateDropdownList() {
const APIListMenu: React.FC = () => {
const ctx = useContext(AppContext);
- if (!ctx) return error
;
return (
{ctx.templateTools.length > 0 &&
}
diff --git a/src/components/MessageBubble.tsx b/src/components/MessageBubble.tsx
index 2cc15c6..186385f 100644
--- a/src/components/MessageBubble.tsx
+++ b/src/components/MessageBubble.tsx
@@ -172,7 +172,6 @@ export function TTSPlay(props: TTSPlayProps) {
function TTSButton(props: TTSProps) {
const [generating, setGenerating] = useState(false);
const ctx = useContext(AppContext);
- if (!ctx) return
error
;
return (