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 {
|
||||
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 (
|
||||
|
@ -169,7 +169,8 @@ export const ProjectCard = ({
|
||||
<DeleteProjectDialogue
|
||||
project={id}
|
||||
open={showDelDialog}
|
||||
onClose={() => {
|
||||
onClose={e => {
|
||||
e.preventDefault();
|
||||
setAnchorEl(null);
|
||||
setShowDelDialog(false);
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user