fix: show silo iframe only if all variables are configured (#881)

This commit is contained in:
M. Palanikannan
2024-08-20 20:03:23 +05:30
committed by GitHub
parent e5c17d0994
commit 968a3a9b84
2 changed files with 5 additions and 4 deletions

View File

@@ -11,7 +11,7 @@ import { EUserWorkspaceRoles } from "@/constants/workspace";
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
import { useUser, useWorkspace } from "@/hooks/store";
import { useInstance, useUser, useWorkspace } from "@/hooks/store";
// plane web components
import IntegrationGuide from "@/plane-web/components/integration/guide";
// plane web hooks
@@ -25,6 +25,8 @@ const ImportsPage = observer(() => {
userProfile: { data: userProfile },
membership: { currentWorkspaceRole },
} = useUser();
const { config } = useInstance();
const { currentWorkspace } = useWorkspace();
// derived values
@@ -44,7 +46,7 @@ const ImportsPage = observer(() => {
</>
);
if (!isSiloIntegrationEnabled)
if (!isSiloIntegrationEnabled || !config?.silo_base_url)
return (
<>
<PageHead title={pageTitle} />

View File

@@ -3,10 +3,9 @@ import { useRef, useCallback, useEffect, useState } from "react";
import { useParams } from "next/navigation";
import { useTheme } from "next-themes";
import useSWR from "swr";
import { LogoSpinner } from "@/components/common";
import { Spinner } from "@plane/ui";
import { cn } from "@/helpers/common.helper";
import { ServiceAPITokenService } from "@/plane-web/services/api_token.service";
import { Spinner } from "@plane/ui";
interface CustomIframeProps {
srcBase: string;