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:
parent
3cad276932
commit
6638a2f47d
@ -8,7 +8,7 @@ import useToast from 'hooks/useToast';
|
|||||||
interface IDeleteProjectDialogueProps {
|
interface IDeleteProjectDialogueProps {
|
||||||
project: string;
|
project: string;
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose?: () => void;
|
onClose: (e: React.SyntheticEvent) => void;
|
||||||
onSuccess?: () => void;
|
onSuccess?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ export const DeleteProjectDialogue = ({
|
|||||||
} catch (ex: unknown) {
|
} catch (ex: unknown) {
|
||||||
setToastApiError(formatUnknownError(ex));
|
setToastApiError(formatUnknownError(ex));
|
||||||
}
|
}
|
||||||
onClose?.();
|
onClose(e);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -169,7 +169,8 @@ export const ProjectCard = ({
|
|||||||
<DeleteProjectDialogue
|
<DeleteProjectDialogue
|
||||||
project={id}
|
project={id}
|
||||||
open={showDelDialog}
|
open={showDelDialog}
|
||||||
onClose={() => {
|
onClose={e => {
|
||||||
|
e.preventDefault();
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
setShowDelDialog(false);
|
setShowDelDialog(false);
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user