Skip to content

Commit

Permalink
chore: add async await to requestLogout (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisyahlen-deriv authored Jul 31, 2024
1 parent 3229033 commit d976781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/context/auth-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export const AuthDataProvider = ({ children }: AuthDataProviderProps) => {
switchAccount(loginid);
}, []);

const logout = useCallback(() => {
requestLogout({
const logout = useCallback(async () => {
await requestLogout({
loginid: activeLoginid,
});
localStorage.removeItem('authToken');
Expand Down

0 comments on commit d976781

Please sign in to comment.