small fixes

This commit is contained in:
Alex
2023-02-24 14:34:02 +00:00
parent 8f0f664393
commit e465daf848
3 changed files with 47 additions and 9 deletions

View File

@@ -49,6 +49,15 @@ export default function Conversation() {
ref={inputRef}
contentEditable
className={`border-000000 overflow-x-hidden; max-h-24 min-h-[2.6rem] w-full overflow-y-auto rounded-xl border bg-white p-2 pr-9 opacity-100 focus:border-2 focus:outline-none`}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
if (inputRef.current?.textContent && status !== 'loading') {
handleQuestion(inputRef.current.textContent);
inputRef.current.textContent = '';
}
}
}}
></div>
{status === 'loading' ? (
<img