Skip to content

Commit 74fabd0

Browse files
author
Eliott Gandiolle
committed
fix: 🐛 use correct data url
1 parent ce06cd9 commit 74fabd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useAllPackageData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const EMPTY_PACKAGES: PackageData[] = PACKAGES.map((name) => ({
1616
export function useAllPackageData(): { packages: PackageData[]; isLoading: boolean; generatedAt: string | null } {
1717
const { data, isLoading } = useQuery<DataFile>({
1818
queryKey: ['data.json'],
19-
queryFn: () => fetch('/data.json').then((r) => r.json()),
19+
queryFn: () => fetch(`${import.meta.env.BASE_URL}data.json`).then((r) => r.json()),
2020
staleTime: 1000 * 60 * 60, // 1 hour
2121
retry: false,
2222
});

0 commit comments

Comments
 (0)