260225_01_ENH: 실제 Data 통계 API와 연결 및 일부 페이지 축소

This commit is contained in:
2026-02-25 16:48:12 +09:00
parent d0e1352739
commit 357d9f2946
38 changed files with 1593 additions and 1352 deletions

22
src/hooks/useResize.ts Normal file
View File

@@ -0,0 +1,22 @@
import { useEffect, useState } from "react";
export const useResizeKey = (debounceMs = 150) => {
const [key, setKey] = useState(0);
useEffect(() => {
let t: number | undefined;
const onResize = () => {
window.clearTimeout(t);
t = window.setTimeout(() => setKey((k) => k + 1), debounceMs);
};
window.addEventListener("resize", onResize);
return () => {
window.removeEventListener("resize", onResize);
window.clearTimeout(t);
};
}, [debounceMs]);
return key;
}