Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrabian committed Dec 11, 2024
2 parents 499757b + bb2f8f8 commit 6dc178f
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions services/ui-src/src/hooks/authHooks/userProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@ export const UserProvider = ({ children }) => {
const [showLocalLogins, setShowLocalLogins] = useState(false);

const logout = useCallback(async () => {
setTimeout(async () => {
try {
console.log("Inside of callback for userProvider!"); //eslint-disable-line no-console
setUser(null);
localStorage.removeItem("mdctcarts_session_exp");
await logoutUser();
} catch (error) {
console.log("error signing out: ", error); // eslint-disable-line no-console
}
});
try {
setUser(null);
localStorage.removeItem("mdctcarts_session_exp");
await logoutUser();
} catch (error) {
console.log("error signing out: ", error); // eslint-disable-line no-console
}
}, []);

const checkAuthState = useCallback(async () => {
Expand Down

0 comments on commit 6dc178f

Please sign in to comment.