MCPcopy
hub / github.com/dubinc/dub / getDimensions

Function getDimensions

packages/ui/src/hooks/use-media-query.ts:13–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11}
12
13function getDimensions() {
14 if (typeof window === "undefined") return null;
15
16 return { width: window.innerWidth, height: window.innerHeight };
17}
18
19export function useMediaQuery() {
20 const [device, setDevice] = useState<"mobile" | "tablet" | "desktop" | null>(

Callers 2

useMediaQueryFunction · 0.85
checkDeviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…