diff --git a/src/lib/queries/board.ts b/src/lib/queries/board.ts index d2f3337..abae54a 100644 --- a/src/lib/queries/board.ts +++ b/src/lib/queries/board.ts @@ -7,6 +7,7 @@ export const useBoards = () => useQuery({ queryKey: ["boards"], queryFn: getBoards, + staleTime: Infinity, }); export const useBoardBySlug = (slug: string) => { @@ -16,6 +17,7 @@ export const useBoardBySlug = (slug: string) => { queryFn: () => getBoardBySlug(slug), initialData: () => queryClient.getQueryData(["boards"])?.find((board) => board.slug === slug), + staleTime: Infinity, }); }; @@ -23,6 +25,7 @@ export const useBoardGroups = () => useQuery({ queryKey: ["boardGroups"], queryFn: getBoardGroups, + staleTime: Infinity, }); export const useBoardGroupBySlug = (slug: string) => { @@ -34,5 +37,6 @@ export const useBoardGroupBySlug = (slug: string) => { queryClient .getQueryData(["boardGroups"]) ?.find((boardGroup) => boardGroup.slug === slug), + staleTime: Infinity, }); };