From c2e42ccd9e1baf28b289d1dbd4054921a73bc288 Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 7 Aug 2023 17:10:37 +0800 Subject: [PATCH] test: add log --- .../src/context/LoginContext/provider.tsx | 10 +++------- apps/dcellar-web-ui/src/store/slices/persist.ts | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/apps/dcellar-web-ui/src/context/LoginContext/provider.tsx b/apps/dcellar-web-ui/src/context/LoginContext/provider.tsx index 4463ad7d..1142d5dd 100644 --- a/apps/dcellar-web-ui/src/context/LoginContext/provider.tsx +++ b/apps/dcellar-web-ui/src/context/LoginContext/provider.tsx @@ -25,6 +25,8 @@ export function LoginContextProvider(props: PropsWithChildren { + console.log('LoginContextProvider: ','logout') + dispatch(resetUploadQueue({loginAccount})) dispatch(setLogout(removeSpAuth)); disconnect(); @@ -39,19 +41,16 @@ export function LoginContextProvider(props: PropsWithChildren { + console.log('useWalletSwitchAccount ===++') logout(); }); const { pathname } = useRouter(); const { address: walletAddress, connector } = useAccount(); - const persist = useAppSelector((root) => root.persist) - console.log('=======================') console.log('wallet:', walletAddress) console.log('login:', loginAccount) - console.log('connector', connector) - console.log('persist', JSON.stringify(persist)) useEffect(() => { console.log('effect 1') @@ -66,11 +65,8 @@ export function LoginContextProvider(props: PropsWithChildren { if (!connector) { - console.log('effect 31') logout() } }, 1000) diff --git a/apps/dcellar-web-ui/src/store/slices/persist.ts b/apps/dcellar-web-ui/src/store/slices/persist.ts index d928b7a6..69a7c759 100644 --- a/apps/dcellar-web-ui/src/store/slices/persist.ts +++ b/apps/dcellar-web-ui/src/store/slices/persist.ts @@ -64,7 +64,6 @@ export const persistSlice = createSlice({ state.bucketSortBy = payload; }, setLogin(state, { payload }: PayloadAction) { - console.log('login:', payload) state.loginAccount = payload; }, setLogout(state, { payload = false }: PayloadAction) {