diff options
| author | blackhao <13851610112@163.com> | 2025-08-22 02:51:50 -0500 |
|---|---|---|
| committer | blackhao <13851610112@163.com> | 2025-08-22 02:51:50 -0500 |
| commit | 4aab4087dc97906d0b9890035401175cdaab32d4 (patch) | |
| tree | 4e2e9d88a711ec5b1cfa02e8ac72a55183b99123 /src/hooks | |
| parent | afa8f50d1d21c721dabcb31ad244610946ab65a3 (diff) | |
2.0
Diffstat (limited to 'src/hooks')
| -rw-r--r-- | src/hooks/useCourseData.ts | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/hooks/useCourseData.ts b/src/hooks/useCourseData.ts deleted file mode 100644 index 74281fa..0000000 --- a/src/hooks/useCourseData.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { useEffect, useState } from "react"; - -export function useCourseData(file = "/data/catalog_2025_fall.json") { - const [catalog, setCatalog] = useState<Record<string, string[]>>({}); - - useEffect(() => { - fetch(file) - .then(r => r.json()) - .then(setCatalog) - .catch(console.error); - }, [file]); - - return catalog; -} |
