import { currentConvoStateAtom, currentPromptAtom, } from "@/_helpers/JotaiWrapper"; import useSendChatMessage from "@/_hooks/useSendChatMessage"; import { useAtomValue } from "jotai"; import Image from "next/image"; const SendButton: React.FC = () => { const currentPrompt = useAtomValue(currentPromptAtom); const currentConvoState = useAtomValue(currentConvoStateAtom); const { sendChatMessage } = useSendChatMessage(); const isWaitingForResponse = currentConvoState?.waitingForResponse ?? false; const disabled = currentPrompt.trim().length === 0 || isWaitingForResponse; const enabledStyle = { backgroundColor: "#FACA15", }; const disabledStyle = { backgroundColor: "#F3F4F6", }; return ( ); }; export default SendButton;