From 0cfe60b490e386a360a46e38769b56057845d377 Mon Sep 17 00:00:00 2001 From: Maayan Hadasi <60384172+mguetta1@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:23:33 +0200 Subject: [PATCH] :bug: Disabling useFetchCache query if RWX_SUPPORTED=false (#1963) Resolves: https://issues.redhat.com/browse/MTA-3699 --------- Signed-off-by: Maayan Hadasi --- client/src/app/queries/cache.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/app/queries/cache.ts b/client/src/app/queries/cache.ts index 949384ff99..d6ffe1a906 100644 --- a/client/src/app/queries/cache.ts +++ b/client/src/app/queries/cache.ts @@ -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"; @@ -10,6 +11,7 @@ export const useFetchCache = () => queryKey: [CacheQueryKey], queryFn: getCache, onError: (error) => console.log("error, ", error), + enabled: isRWXSupported, }); export const useDeleteCacheMutation = (