MCPcopy Create free account
hub / github.com/arctic-cli/interface / onChange

Function onChange

packages/web/hooks/use-mobile.ts:12–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10 React.useEffect(() => {
11 const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
12 const onChange = () => {
13 setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
14 };
15 mql.addEventListener("change", onChange);
16 setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
17 return () => mql.removeEventListener("change", onChange);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected