From 890888a274bfa1d2ceebfb37e462b6ea0fb1d51d Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Mon, 15 Jul 2024 13:27:20 +0530 Subject: [PATCH] chore: export issues validation added (#5118) --- web/core/components/exporter/guide.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/core/components/exporter/guide.tsx b/web/core/components/exporter/guide.tsx index fd9414b047..1a576bd1bf 100644 --- a/web/core/components/exporter/guide.tsx +++ b/web/core/components/exporter/guide.tsx @@ -19,7 +19,7 @@ import { EmptyStateType } from "@/constants/empty-state"; import { EXPORT_SERVICES_LIST } from "@/constants/fetch-keys"; import { EXPORTERS_LIST } from "@/constants/workspace"; // hooks -import { useUser } from "@/hooks/store"; +import { useProject, useUser } from "@/hooks/store"; import { useAppRouter } from "@/hooks/use-app-router"; // services import { IntegrationService } from "@/services/integrations"; @@ -38,6 +38,7 @@ const IntegrationGuide = observer(() => { const provider = searchParams.get("provider"); // store hooks const { data: currentUser } = useUser(); + const { workspaceProjectIds } = useProject(); const { data: exporterServices } = useSWR( workspaceSlug && cursor ? EXPORT_SERVICES_LIST(workspaceSlug as string, cursor, `${per_page}`) : null, @@ -50,6 +51,8 @@ const IntegrationGuide = observer(() => { router.replace(`/${workspaceSlug?.toString()}/settings/exports`); }; + const hasProjects = workspaceProjectIds && workspaceProjectIds.length > 0; + return ( <>
@@ -73,7 +76,7 @@ const IntegrationGuide = observer(() => {
-