Skip to content

Commit aba097f

Browse files
committed
fix: removed extra check
1 parent 9183035 commit aba097f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/layout/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ const Layout = () => {
2121
const clientAccounts = JSON.parse(localStorage.getItem('accountsList') ?? '{}');
2222
const checkClientAccount = JSON.parse(localStorage.getItem('clientAccounts') ?? '{}');
2323
const checkAccountList = JSON.parse(localStorage.getItem('accountList') ?? '{}');
24-
const AccountLengthsEqual = JSON.stringify(clientAccounts) === JSON.stringify(checkClientAccount);
24+
const accountLengthsEqual = JSON.stringify(clientAccounts) === JSON.stringify(checkClientAccount);
2525

26-
console.log('clientAccounts', { checkClientAccount, checkAccountList, AccountLengthsEqual });
26+
console.log('clientAccounts', { checkClientAccount, checkAccountList, accountLengthsEqual });
2727
useEffect(() => {
28-
if (isLoggedInCookie && isOAuth2Enabled && !isEndpointPage && !isCallbackPage && !AccountLengthsEqual) {
28+
if (isLoggedInCookie && isOAuth2Enabled && !isEndpointPage && !isCallbackPage && !accountLengthsEqual) {
2929
console.log('requestOidcAuthentication');
3030
requestOidcAuthentication({
3131
redirectCallbackUri: `${window.location.origin}/callback`,
3232
});
3333
}
34-
}, [isLoggedInCookie, isOAuth2Enabled, isEndpointPage, isCallbackPage]);
34+
}, [isLoggedInCookie, isOAuth2Enabled, isEndpointPage, isCallbackPage, accountLengthsEqual]);
3535

3636
return (
3737
<div className={clsx('layout', { responsive: isDesktop })}>

0 commit comments

Comments
 (0)