import {useEffect, useState} from 'react'; import {useClient} from '@/context/client.js'; import styles from './chat.module.css'; export default function Chat({ chatHistory, onClose, message, setChatHistory, setMessage, }) { const client = useClient(); const [disabled, setDisabled] = useState(true); const [historyCaret, setHistoryCaret] = useState(0); useEffect(() => { setDisabled(false); }, []); return (