feat: Add website (#1157)

Co-authored-by: Bjorn Lammers <bjorn@lammers.media>
This commit is contained in:
Thomas Camlong
2025-04-16 16:18:20 +02:00
committed by GitHub
parent f46843795d
commit bfe293f090
86 changed files with 13563 additions and 1269 deletions

View 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
}