Skip to content

Commit 87aa7fa

Browse files
committed
changed order of reloads
1 parent 492e9ee commit 87aa7fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

web/src/components/chat/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const MainContent = () => {
2929
aiState.id !== '' // id is set only once the chat has been saved to the db
3030
) {
3131
// reloads the sidebar, which repulls from the db now that the chat has been saved
32+
router.push(`/${aiState.group}/chat/${aiState.id}`);
3233
router.refresh();
33-
window.history.pushState({}, '', `/ucdavis/chat/${aiState.id}`); // change to group
3434
}
3535
}, [aiState.messages, router, aiState.id, pathname]);
3636

0 commit comments

Comments
 (0)