feat: replace getDocumentTypeCounts with useQuery implementation (10min stale time)

This commit is contained in:
CREDO23 2025-12-08 09:10:04 +00:00
parent 42e10bbe55
commit e7982ead4e
2 changed files with 12 additions and 18 deletions

View file

@ -26,6 +26,7 @@ export const documentTypeCountsAtom = atomWithQuery((get) => {
return {
queryKey: cacheKeys.documents.typeCounts(searchSpaceId ?? undefined),
enabled: !!searchSpaceId,
staleTime: 10 * 60 * 1000, // 10 minutes
queryFn: async () => {
return documentsApiService.getDocumentTypeCounts({
queryParams: {