diff --git a/src/components/ImageGenDrawer.tsx b/src/components/ImageGenDrawer.tsx index 739a3d5..0414c6b 100644 --- a/src/components/ImageGenDrawer.tsx +++ b/src/components/ImageGenDrawer.tsx @@ -15,7 +15,7 @@ import { import { Button } from "@/components/ui/button"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; -import { AppContext } from "@/pages/App"; +import { AppChatStoreContext, AppContext } from "@/pages/App"; import { PaintBucketIcon } from "lucide-react"; interface Props { @@ -27,7 +27,7 @@ interface ImageResponse { revised_prompt: string; } export function ImageGenDrawer({ disableFactor }: Props) { - const ctx = useContext(AppContext); + const { chatStore, setChatStore } = useContext(AppChatStoreContext); const [showGenImage, setShowGenImage] = useState(false); const [imageGenPrompt, setImageGenPrompt] = useState(""); @@ -42,7 +42,7 @@ export function ImageGenDrawer({ disableFactor }: Props) { useState("b64_json"); return ( <> - {ctx.chatStore.image_gen_api && ctx.chatStore.image_gen_key ? ( + {chatStore.image_gen_api && chatStore.image_gen_key ? (