disables chat scroll when nav state is modified

pull/135/head
ajaythapliyal 2 years ago
parent a748f92c7c
commit f703b89c00

@ -19,8 +19,9 @@ export default function Conversation() {
const endMessageRef = useRef<HTMLDivElement>(null); const endMessageRef = useRef<HTMLDivElement>(null);
const inputRef = useRef<HTMLDivElement>(null); const inputRef = useRef<HTMLDivElement>(null);
useEffect(() => useEffect(
endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }), () => endMessageRef?.current?.scrollIntoView({ behavior: 'smooth' }),
[messages],
); );
const handleQuestion = (question: string) => { const handleQuestion = (question: string) => {

Loading…
Cancel
Save