Skip to content

Commit

Permalink
Refactor handleClear function in ChatPanel component
Browse files Browse the repository at this point in the history
  • Loading branch information
miurla committed Apr 7, 2024
1 parent 0226488 commit cbd1d98
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions components/chat-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,9 @@ export function ChatPanel() {

// Clear messages
const handleClear = () => {
// refresh the page
// currently, streamable ui is buggy, so we need to refresh the page to clear the state
window.location.reload()

// setIsButtonPressed(true);
// setMessages([]);
// setAiMessages([]);
setIsButtonPressed(true)
setMessages([])
setAiMessages([])
}

useEffect(() => {
Expand Down

0 comments on commit cbd1d98

Please sign in to comment.