mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: disable org menu when in focus mode on the activity page
This commit is contained in:
parent
46bf3f9c82
commit
59b5ac4793
2 changed files with 46 additions and 1 deletions
|
|
@ -161,6 +161,10 @@ function ActivityClient(props: ActivityClientProps) {
|
|||
React.useEffect(() => {
|
||||
if (typeof window !== 'undefined') {
|
||||
localStorage.setItem('globalFocusMode', isFocusMode.toString());
|
||||
// Dispatch custom event for focus mode change
|
||||
window.dispatchEvent(new CustomEvent('focusModeChange', {
|
||||
detail: { isFocusMode }
|
||||
}));
|
||||
isInitialRender.current = false;
|
||||
}
|
||||
}, [isFocusMode]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue