MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / onChange

Function onChange

web/src/hooks/use-mobile.tsx:10–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 6

FeedbackTextSectionFunction · 0.85
createTextPasteHandlerFunction · 0.85
createPasteHandlerFunction · 0.85
AvatarUploadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected