import { currentPromptAtom } from "@/_helpers/JotaiWrapper"; import { currentConvoStateAtom } from "@/_helpers/atoms/Conversation.atom"; import useSendChatMessage from "@/_hooks/useSendChatMessage"; import { ArrowRightIcon } from "@heroicons/react/24/outline"; import { useAtom, useAtomValue } from "jotai"; const SendButton: React.FC = () => { const [currentPrompt] = useAtom(currentPromptAtom); const currentConvoState = useAtomValue(currentConvoStateAtom); const { sendChatMessage } = useSendChatMessage(); const isWaitingForResponse = currentConvoState?.waitingForResponse ?? false; const disabled = currentPrompt.trim().length === 0 || isWaitingForResponse; const disabledStyle = { backgroundColor: "#F3F4F6", }; return ( ); }; export default SendButton;