Skip to content

Commit

Permalink
🐛 Disabling useFetchCache query if RWX_SUPPORTED=false (#1963)
Browse files Browse the repository at this point in the history
Resolves: https://issues.redhat.com/browse/MTA-3699

---------

Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 authored Oct 30, 2024
1 parent 1b4a17b commit 0cfe60b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/src/app/queries/cache.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMutation, useQuery } from "@tanstack/react-query";

import { deleteCache, getCache } from "@app/api/rest";
import { isRWXSupported } from "@app/Constants";

export const CacheQueryKey = "cache";
export const CleanProgressQueryKey = "cleanProgress";
Expand All @@ -10,6 +11,7 @@ export const useFetchCache = () =>
queryKey: [CacheQueryKey],
queryFn: getCache,
onError: (error) => console.log("error, ", error),
enabled: isRWXSupported,
});

export const useDeleteCacheMutation = (
Expand Down

0 comments on commit 0cfe60b

Please sign in to comment.