Fix routing details

This commit is contained in:
Timothy Armes
2024-09-30 09:42:37 +02:00
parent 08cbcd785e
commit 03f5ea3454
20 changed files with 60 additions and 43 deletions
+4
View File
@@ -1,8 +1,11 @@
import { useQuery } from "@tanstack/react-query";
import { useSession } from "next-auth/react";
import { myZones } from "@/server/myZones";
export const useZones = () => {
const { status } = useSession();
const query = useQuery({
queryKey: ["zones"],
queryFn: async () => myZones(),
@@ -10,6 +13,7 @@ export const useZones = () => {
staleTime: Infinity,
gcTime: 10 * 60 * 1000,
retry: false,
enabled: status === "authenticated",
});
return {