Skip to content

Commit

Permalink
delay logout count
Browse files Browse the repository at this point in the history
  • Loading branch information
wusteven815 committed Nov 6, 2024
1 parent ee0af9c commit 9e2d983
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/app-utils/src/components/AppBootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export function AppBootstrap({
const [logoutCount, setLogoutCount] = useState(0);
const onLogin = useCallback(() => undefined, []);
const onLogout = useCallback(() => {
setLogoutCount(value => value + 1);
requestAnimationFrame(() => {
setLogoutCount(value => value + 1);
});
}, []);
useBroadcastLoginListener(onLogin, onLogout);
return (
Expand Down

0 comments on commit 9e2d983

Please sign in to comment.