1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00

fix: delete project dialog cancel redirect (#4184)

https://linear.app/unleash/issue/2-1204/delete-project-dialog-cancel-button-wrong-redirect

Fixes an issue where the project deletion dialog would redirect if
canceled.
This commit is contained in:
Nuno Góis 2023-07-07 15:04:21 +01:00 committed by GitHub
parent 3cad276932
commit 6638a2f47d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -8,7 +8,7 @@ import useToast from 'hooks/useToast';
interface IDeleteProjectDialogueProps {
project: string;
open: boolean;
onClose?: () => void;
onClose: (e: React.SyntheticEvent) => void;
onSuccess?: () => void;
}
@ -36,7 +36,7 @@ export const DeleteProjectDialogue = ({
} catch (ex: unknown) {
setToastApiError(formatUnknownError(ex));
}
onClose?.();
onClose(e);
};
return (

View File

@ -169,7 +169,8 @@ export const ProjectCard = ({
<DeleteProjectDialogue
project={id}
open={showDelDialog}
onClose={() => {
onClose={e => {
e.preventDefault();
setAnchorEl(null);
setShowDelDialog(false);
}}