1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-28 00:17:12 +01:00

chore: make remove release plan warning conditional on env. enabled (#9103)

This commit is contained in:
David Leek 2025-01-15 15:29:49 +01:00 committed by GitHub
parent c98d0e71a3
commit d20af9e5de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -185,6 +185,7 @@ export const ReleasePlan = ({
open={removeOpen}
setOpen={setRemoveOpen}
onConfirm={onRemoveConfirm}
environmentActive={!environmentIsDisabled}
/>
</StyledContainer>
);

View File

@ -8,6 +8,7 @@ interface IReleasePlanRemoveDialogProps {
open: boolean;
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
onConfirm: () => void;
environmentActive: boolean;
}
export const ReleasePlanRemoveDialog = ({
@ -15,6 +16,7 @@ export const ReleasePlanRemoveDialog = ({
open,
setOpen,
onConfirm,
environmentActive,
}: IReleasePlanRemoveDialogProps) => (
<Dialogue
title='Remove release plan?'
@ -25,7 +27,7 @@ export const ReleasePlanRemoveDialog = ({
onClose={() => setOpen(false)}
>
<ConditionallyRender
condition={Boolean(plan.activeMilestoneId)}
condition={Boolean(plan.activeMilestoneId) && environmentActive}
show={
<Alert severity='error' sx={{ mb: 2 }}>
This release plan currently has one active milestone.