mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat: replace getDocumentTypeCounts with useQuery implementation (10min stale time)
This commit is contained in:
parent
42e10bbe55
commit
e7982ead4e
2 changed files with 12 additions and 18 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue