From 653794f50ebd725d5e369190220a848e7902a7b9 Mon Sep 17 00:00:00 2001 From: donniean <12584040+donniean@users.noreply.github.com> Date: Wed, 25 Sep 2024 11:24:16 +0800 Subject: [PATCH] chore: disable kapis/config.kubesphere.io/v1alpha2/configs/marketplace (#4312) Signed-off-by: donniean --- packages/core/src/stores/marketplace.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/core/src/stores/marketplace.ts b/packages/core/src/stores/marketplace.ts index 555fb81d166..dc6130e2559 100644 --- a/packages/core/src/stores/marketplace.ts +++ b/packages/core/src/stores/marketplace.ts @@ -48,17 +48,18 @@ function useMarketplaceConfigQuery(options?: UseMarketplaceConfigQueryOptions) { const onSuccess = options?.onSuccess; const result = useQuery({ + enabled: false, queryKey, queryFn: () => request.get(url, { headers }).then(formatMarketplaceConfig), onSuccess: data => onSuccess?.(data), }); - const isSettled = result.isSuccess || result.isError; + // const isSettled = result.isSuccess || result.isError; const formattedMarketplaceConfig = result.data; - const isOnline = isSettled ? Boolean(formattedMarketplaceConfig?.url) : undefined; - const isOffline = isSettled ? !isOnline : undefined; + // const isOnline = isSettled ? Boolean(formattedMarketplaceConfig?.url) : undefined; + // const isOffline = isSettled ? !isOnline : undefined; - return { ...result, formattedMarketplaceConfig, isOnline, isOffline }; + return { ...result, formattedMarketplaceConfig, isOnline: false, isOffline: true }; } interface UseMarketplaceCallbackQueryOptions {