initial commit

This commit is contained in:
2025-04-09 11:20:41 +02:00
parent a452f7354a
commit fef9984140
1399 changed files with 92621 additions and 6 deletions
+21
View File
@@ -0,0 +1,21 @@
"use client";
import { fetchVersions } from "@/lib/data";
import { AppVersion } from "@/lib/types";
import { useQuery } from "@tanstack/react-query";
export function useVersions() {
return useQuery<AppVersion[]>({
queryKey: ["versions"],
queryFn: async () => {
const fetchedVersions = await fetchVersions();
if (Array.isArray(fetchedVersions)) {
return fetchedVersions;
}
if (fetchedVersions && typeof fetchedVersions === "object") {
return [fetchedVersions];
}
return [];
},
});
}