better performance

This commit is contained in:
Amirhossein Mahmoodi
2025-01-05 14:22:50 +03:30
parent 1559f98a01
commit 58cd380c64
4 changed files with 32 additions and 18 deletions

View File

@@ -14,5 +14,5 @@ export const usePermissions = () => {
}
};
return useSWR(GET_PERMISSIONS_ROUTE, fetcher, { keepPreviousData: true });
return useSWR(GET_PERMISSIONS_ROUTE, fetcher, { keepPreviousData: true, dedupingInterval: 30000 });
};

View File

@@ -14,5 +14,5 @@ export const useSidebarBadge = () => {
}
};
return useSWR(GET_SIDEBAR_BADGE_ROUTE, fetcher, { keepPreviousData: true });
return useSWR(GET_SIDEBAR_BADGE_ROUTE, fetcher, { keepPreviousData: true, dedupingInterval: 30000 });
};