diff --git a/frontend/src/conversation/Conversation.tsx b/frontend/src/conversation/Conversation.tsx index 2102ec2..b8e0cf0 100644 --- a/frontend/src/conversation/Conversation.tsx +++ b/frontend/src/conversation/Conversation.tsx @@ -19,8 +19,9 @@ export default function Conversation() { const endMessageRef = useRef(null); const inputRef = useRef(null); - useEffect(() => - endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }), + useEffect( + () => endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }), + [messages], ); const handleQuestion = (question: string) => { @@ -35,7 +36,7 @@ export default function Conversation() { return (