diff --git a/frontend/src/component/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/useFeatureToggleSwitch.tsx b/frontend/src/component/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/useFeatureToggleSwitch.tsx index bcb769207d41..51c51bbe0ec2 100644 --- a/frontend/src/component/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/useFeatureToggleSwitch.tsx +++ b/frontend/src/component/project/Project/ProjectFeatureToggles/FeatureToggleSwitch/useFeatureToggleSwitch.tsx @@ -14,6 +14,7 @@ import { OnFeatureToggleSwitchArgs, UseFeatureToggleSwitchType, } from './FeatureToggleSwitch.types'; +import { ConditionallyRender } from 'component/common/ConditionallyRender/ConditionallyRender'; type Middleware = (next: () => void) => void; @@ -212,10 +213,19 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = ( [setProdGuardModalState], ); + const featureSelected = enableEnvironmentDialogState.featureId.length !== 0; + const modals = ( <> - + + } + /> { @@ -238,5 +248,8 @@ export const useFeatureToggleSwitch: UseFeatureToggleSwitchType = ( ); - return { onToggle, modals }; + return { + onToggle, + modals, + }; };