feat(ui): add responsive layout support for mobile and small screens

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xintaofei
2026-04-07 15:47:16 +08:00
parent dd659dcaa5
commit 768d1326b1
17 changed files with 664 additions and 216 deletions

View File

@@ -0,0 +1,15 @@
"use client"
import { useSyncExternalStore } from "react"
export function useMediaQuery(query: string): boolean {
return useSyncExternalStore(
(callback) => {
const mql = window.matchMedia(query)
mql.addEventListener("change", callback)
return () => mql.removeEventListener("change", callback)
},
() => window.matchMedia(query).matches,
() => false
)
}