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:
parent
c98d0e71a3
commit
d20af9e5de
@ -185,6 +185,7 @@ export const ReleasePlan = ({
|
||||
open={removeOpen}
|
||||
setOpen={setRemoveOpen}
|
||||
onConfirm={onRemoveConfirm}
|
||||
environmentActive={!environmentIsDisabled}
|
||||
/>
|
||||
</StyledContainer>
|
||||
);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user