Skip to content

Commit

Permalink
fix: open file blocks logout (#2281)
Browse files Browse the repository at this point in the history
- Fixes #1685 
- Delays `AuthPluginPsk` remount so the broadcast message is received in
time
  • Loading branch information
wusteven815 authored Nov 28, 2024
1 parent 2216274 commit 7ff0e53
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 7ff0e53

Please sign in to comment.