Skip to content

Commit

Permalink
fix(types): type messagesEndRef in useRef
Browse files Browse the repository at this point in the history
  • Loading branch information
jferrettiboke committed May 6, 2024
1 parent ce8e942 commit ea472dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Chat = ({
const [threadId, setThreadId] = useState("");

// automitcally scroll to bottom of chat
const messagesEndRef = useRef(null);
const messagesEndRef = useRef<HTMLDivElement | null>(null);
const scrollToBottom = () => {
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
};
Expand Down

0 comments on commit ea472dd

Please sign in to comment.