💄 Fix Layout

This commit is contained in:
刘嘉伟 committed 2026-03-03 11:32:14 +08:00
1 parent 90f7bc28e3
commit 99032f219b
1 file changed
+2 -2
+2 -2
View File
@@ -24,10 +24,10 @@ function useIsMobile() {
navigator.userAgent,
);
const [isSmall, setIsSmall] = useState(() => window.matchMedia("(max-width: 639px)").matches);
const [isSmall, setIsSmall] = useState(() => window.matchMedia("(max-width: 760px)").matches);
useEffect(() => {
const mq = window.matchMedia("(max-width: 639px)");
const mq = window.matchMedia("(max-width: 760px)");
const handler = (e: MediaQueryListEvent) => setIsSmall(e.matches);
mq.addEventListener("change", handler);
return () => mq.removeEventListener("change", handler);