Skip to content

Commit

Permalink
fix: silent login
Browse files Browse the repository at this point in the history
  • Loading branch information
rupato-deriv committed Feb 17, 2025
1 parent 41bc84b commit 3df31e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function App() {
};

React.useEffect(() => {
const accounts_list = JSON.parse(localStorage.getItem('accountsList') || '{}');
const accounts_list = localStorage.getItem('accountsList') || '{}';
const cookie_accounts = Cookies.get('client.accounts') || '{}';
const stored_accounts = JSON.parse(localStorage.getItem('clientAccounts') || '{}');

Expand All @@ -80,11 +80,10 @@ function App() {
accounts_list[loginid] = data.token;
});

localStorage.setItem('accountsList', JSON.stringify(accounts_list));
localStorage.setItem('accountsList', accounts_list);
} else {
console.error('Invalid cookie_accounts format');
}
localStorage.setItem('accountsList', JSON.stringify(accounts_list));

const client_accounts = {
...stored_accounts,
Expand Down

0 comments on commit 3df31e7

Please sign in to comment.