Merge: Restore root-level structure + add skills/docs/codebases
- Restored original root-level src/, package.json, etc. - Added skills/ directory with Claude Code skills - Added original-docs/ with source documentation - Added codebases/z-ai-tooling/ as reference codebase - Updated README.md with complete documentation Total: Combined 82 original files + new skills structure
This commit is contained in:
19
codebases/z-ai-tooling/src/hooks/use-mobile.ts
Executable file
19
codebases/z-ai-tooling/src/hooks/use-mobile.ts
Executable file
@@ -0,0 +1,19 @@
|
||||
import * as React from "react"
|
||||
|
||||
const MOBILE_BREAKPOINT = 768
|
||||
|
||||
export function useIsMobile() {
|
||||
const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
|
||||
|
||||
React.useEffect(() => {
|
||||
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
|
||||
const onChange = () => {
|
||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
||||
}
|
||||
mql.addEventListener("change", onChange)
|
||||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
|
||||
return () => mql.removeEventListener("change", onChange)
|
||||
}, [])
|
||||
|
||||
return !!isMobile
|
||||
}
|
||||
Reference in New Issue
Block a user