wrapping scrollIntoView in {} to prevent it from returning void

This commit is contained in:
Carter 2026-07-21 11:59:48 -06:00
parent ddd0b5062b
commit 696fbb3593

View file

@ -24,11 +24,11 @@ export default function ChatOutput(props: Props) {
const ScrollToBottom = () => {
const elementRef = useRef<null | HTMLDivElement>(null);
useEffect(() =>
useEffect(() => {
elementRef?.current?.scrollIntoView({
block: "end"
})
);
});
});
let elem = <div ref={elementRef} />;
return elem;
};