1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

fix/remove cancel button (#5838)

This PR removes the cancel button from the new constraint accordion.
Since we now do autosave when the constraint updates, cancel is no
longer needed, the done button and delete button is enough.
This commit is contained in:
Fredrik Strand Oseberg 2024-01-11 08:55:49 +01:00 committed by GitHub
parent 4a2fc87934
commit 0b50a4e7c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 12 deletions

View File

@ -225,10 +225,7 @@ export const ConstraintAccordionEdit = ({
expanded={expanded}
TransitionProps={{
onExited: () => {
if (action === CANCEL) {
setAction('');
onCancel();
} else if (action === SAVE) {
if (action === SAVE) {
setAction('');
onSave(localConstraint);
}

View File

@ -69,14 +69,6 @@ export const ConstraintAccordionEditBody: React.FC<IConstraintAccordionBody> =
>
Done
</StyledLeftButton>
<StyledRightButton
onClick={() => {
setAction(CANCEL);
triggerTransition();
}}
>
Cancel
</StyledRightButton>
</StyledInputButtonContainer>
</StyledButtonContainer>
</>