disables chat scroll when nav state is modified

This commit is contained in:
ajaythapliyal committed 2023-02-27 07:31:02 +05:30
1 parent a748f92c7c
commit f703b89c00
1 file changed
+3 -2
+3 -2
View File
@@ -19,8 +19,9 @@ export default function Conversation() {
const endMessageRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLDivElement>(null);
useEffect(() =>
endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }),
useEffect(
() => endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }),
[messages],
);
const handleQuestion = (question: string) => {