Skip to content

Commit

Permalink
chore: make remove release plan warning conditional on env. enabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
daveleek authored Jan 15, 2025
1 parent c98d0e7 commit d20af9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ export const ReleasePlan = ({
open={removeOpen}
setOpen={setRemoveOpen}
onConfirm={onRemoveConfirm}
environmentActive={!environmentIsDisabled}
/>
</StyledContainer>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ interface IReleasePlanRemoveDialogProps {
open: boolean;
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
onConfirm: () => void;
environmentActive: boolean;
}

export const ReleasePlanRemoveDialog = ({
plan,
open,
setOpen,
onConfirm,
environmentActive,
}: IReleasePlanRemoveDialogProps) => (
<Dialogue
title='Remove release plan?'
Expand All @@ -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.
Expand Down

0 comments on commit d20af9e

Please sign in to comment.