MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / getDevice

Function getDevice

src/tailwind/Components/FluidGlass/FluidGlass.jsx:155–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153 desktop: { max: Infinity, spacing: 0.3, fontSize: 0.045 }
154 };
155 const getDevice = () => {
156 const w = window.innerWidth;
157 return w <= DEVICE.mobile.max ? 'mobile' : w <= DEVICE.tablet.max ? 'tablet' : 'desktop';
158 };
159
160 const [device, setDevice] = useState(getDevice());
161

Callers 3

NavItemsFunction · 0.70
onResizeFunction · 0.70
TypographyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected