From 34e10fa8aa12d34087d80bf2724e4698d0165012 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Wed, 29 Jan 2025 11:54:19 +0100 Subject: [PATCH] fix: apply feedback update --- frontend/src/contexts/auth.context.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/contexts/auth.context.tsx b/frontend/src/contexts/auth.context.tsx index 41e4c81f..d6b72228 100644 --- a/frontend/src/contexts/auth.context.tsx +++ b/frontend/src/contexts/auth.context.tsx @@ -108,8 +108,10 @@ export const AuthProvider = ({ children }: AuthProviderProps): JSX.Element => { setIsReady(true); }, []); - useBroadcastChannel("session", () => { - router.reload(); + useBroadcastChannel("session", (e) => { + if (e.data === "logout") { + router.reload(); + } }); if (!isReady || isLoading) return ;