MCPcopy Create free account
hub / github.com/core7s/react-design-editor / updateMediaQuery

Function updateMediaQuery

src/Container.tsx:16–24  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

14 const [loaded, setLoaded] = useState(false)
15 const dispatch = useAppDispatch()
16 const updateMediaQuery = (value: number) => {
17 if (!isMobile && value >= 800) {
18 setIsMobile(false)
19 } else if (!isMobile && value < 800) {
20 setIsMobile(true)
21 } else {
22 setIsMobile(false)
23 }
24 }
25 useEffect(() => {
26 const containerElement = containerRef.current!
27 const containerWidth = containerElement.clientWidth

Callers 1

ContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected