disables chat scroll when nav state is modified

This commit is contained in:
ajaythapliyal 2023-02-27 07:31:02 +05:30
parent a748f92c7c
commit f703b89c00

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) => {