mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: toast alert inconsistency (#2730)
This commit is contained in:
parent
20fb79567f
commit
931f9d288a
@ -45,6 +45,11 @@ export const DeleteModuleModal: React.FC<Props> = observer((props) => {
|
||||
.then(() => {
|
||||
if (moduleId) router.push(`/${workspaceSlug}/projects/${data.project}/modules`);
|
||||
handleClose();
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Success!",
|
||||
message: "Module deleted successfully.",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
setToastAlert({
|
||||
|
@ -62,6 +62,11 @@ export const DeleteProjectModal: React.FC<DeleteProjectModal> = (props) => {
|
||||
if (projectId && projectId.toString() === project.id) router.push(`/${workspaceSlug}/projects`);
|
||||
|
||||
handleClose();
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Success!",
|
||||
message: "Project deleted successfully.",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
setToastAlert({
|
||||
|
@ -32,7 +32,14 @@ export const CreateUpdateProjectViewModal: FC<Props> = observer((props) => {
|
||||
const createView = async (payload: IProjectView) => {
|
||||
await projectViewsStore
|
||||
.createView(workspaceSlug, projectId, payload)
|
||||
.then(() => handleClose())
|
||||
.then(() => {
|
||||
handleClose();
|
||||
setToastAlert({
|
||||
type: "success",
|
||||
title: "Success!",
|
||||
message: "View created successfully.",
|
||||
});
|
||||
})
|
||||
.catch(() =>
|
||||
setToastAlert({
|
||||
type: "error",
|
||||
|
Loading…
Reference in New Issue
Block a user