Skip to content

Commit 7a392b0

Browse files
authored
Merge pull request openai#13 from jferrettiboke/patch-1
fix(types): type `messagesEndRef` in `useRef`
2 parents 30638cf + de0366e commit 7a392b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/components/chat.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const Chat = ({
6666
const [threadId, setThreadId] = useState("");
6767

6868
// automatically scroll to bottom of chat
69-
const messagesEndRef = useRef(null);
69+
const messagesEndRef = useRef<HTMLDivElement | null>(null);
7070
const scrollToBottom = () => {
7171
messagesEndRef.current?.scrollIntoView({ behavior: "smooth" });
7272
};

0 commit comments

Comments
 (0)