Browse Source

fix: useEffect hooks

leedom 2 năm trước cách đây
mục cha
commit
e5b4cb28fe
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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}>