MCPcopy Create free account
hub / github.com/dailydotdev/apps / usePauseBootPopups

Function usePauseBootPopups

packages/shared/src/lib/bootPopupsPause.ts:24–39  ·  view source on GitHub ↗
(shouldPause: boolean)

Source from the content-addressed store, hash-verified

22 useSyncExternalStore(subscribe, getIsPaused, () => false);
23
24export const usePauseBootPopups = (shouldPause: boolean): void => {
25 useEffect(() => {
26 if (!shouldPause) {
27 return undefined;
28 }
29
30 const pauser = Symbol('bootPopupsPauser');
31 pausers.add(pauser);
32 notify();
33
34 return () => {
35 pausers.delete(pauser);
36 notify();
37 };
38 }, [shouldPause]);
39};

Callers 2

SquadRouteFunction · 0.90

Calls 1

notifyFunction · 0.85

Tested by

no test coverage detected