Skip to content

Commit

Permalink
fix: clear event store on logout.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZL-Asica committed Dec 5, 2024
1 parent 8cc5e96 commit 17f5e8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stores/userStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ const useUserStore = create<UserState>()(
try {
set({ loading: true });
await logoutUser(navigate);
const eventStore = useEventStore.getState();
eventStore.setEvents([]);

set({ user: undefined, error: null });
} catch (error) {
console.error('Error during logout:', error);
Expand Down

0 comments on commit 17f5e8a

Please sign in to comment.