mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 23:52:09 +00:00
swapped polling to react query
This commit is contained in:
@@ -122,7 +122,7 @@ export const useGetServerRootKmsEncryptionDetails = () => {
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetInvalidatingCacheStatus = () => {
|
||||
export const useGetInvalidatingCacheStatus = (enabled = true) => {
|
||||
return useQuery({
|
||||
queryKey: adminQueryKeys.getInvalidateCache(),
|
||||
queryFn: async () => {
|
||||
@@ -131,6 +131,8 @@ export const useGetInvalidatingCacheStatus = () => {
|
||||
);
|
||||
|
||||
return data.invalidating;
|
||||
}
|
||||
},
|
||||
enabled,
|
||||
refetchInterval: (data) => (data ? 3000 : false)
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user