From 512cf3ee849caa47bc20b6166f7c2fcbdae4b759 Mon Sep 17 00:00:00 2001 From: mayuran-deriv Date: Mon, 26 May 2025 10:34:35 +0400 Subject: [PATCH] fix: logout from other platform --- src/hooks/useTmb/index.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/hooks/useTmb/index.tsx b/src/hooks/useTmb/index.tsx index 881a1313..8f9be577 100644 --- a/src/hooks/useTmb/index.tsx +++ b/src/hooks/useTmb/index.tsx @@ -103,6 +103,19 @@ const useTMB = (): UseTMBReturn => { ) { history.push('/'); } + } else { + Cookies.set('logged_state', 'false', { + domain: currentDomain, + expires: 30, + path: '/', + secure: true, + }); + updateLoginAccounts([]); + updateCurrentLoginAccount({ + name: '', + token: '', + currency: '', + }); } }, [getActiveSessions, handleLogout, domains, currentDomain]);