瀏覽代碼

fix: useEffect hooks

leedom 1 年之前
父節點
當前提交
e5b4cb28fe
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/components/chat.tsx

+ 2 - 1
app/components/chat.tsx

@@ -522,7 +522,8 @@ export function Chat(props: {
   // Textarea Adaptive height
   useEffect(() => {
     resizeTextarea();
-  });
+    // eslint-disable-next-line react-hooks/exhaustive-deps
+  }, [userInput]);
 
   return (
     <div className={styles.chat} key={session.id}>