forked from github/plane
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(() => {
|
.then(() => {
|
||||||
if (moduleId) router.push(`/${workspaceSlug}/projects/${data.project}/modules`);
|
if (moduleId) router.push(`/${workspaceSlug}/projects/${data.project}/modules`);
|
||||||
handleClose();
|
handleClose();
|
||||||
|
setToastAlert({
|
||||||
|
type: "success",
|
||||||
|
title: "Success!",
|
||||||
|
message: "Module deleted successfully.",
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
|
@ -62,6 +62,11 @@ export const DeleteProjectModal: React.FC<DeleteProjectModal> = (props) => {
|
|||||||
if (projectId && projectId.toString() === project.id) router.push(`/${workspaceSlug}/projects`);
|
if (projectId && projectId.toString() === project.id) router.push(`/${workspaceSlug}/projects`);
|
||||||
|
|
||||||
handleClose();
|
handleClose();
|
||||||
|
setToastAlert({
|
||||||
|
type: "success",
|
||||||
|
title: "Success!",
|
||||||
|
message: "Project deleted successfully.",
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
|
@ -32,7 +32,14 @@ export const CreateUpdateProjectViewModal: FC<Props> = observer((props) => {
|
|||||||
const createView = async (payload: IProjectView) => {
|
const createView = async (payload: IProjectView) => {
|
||||||
await projectViewsStore
|
await projectViewsStore
|
||||||
.createView(workspaceSlug, projectId, payload)
|
.createView(workspaceSlug, projectId, payload)
|
||||||
.then(() => handleClose())
|
.then(() => {
|
||||||
|
handleClose();
|
||||||
|
setToastAlert({
|
||||||
|
type: "success",
|
||||||
|
title: "Success!",
|
||||||
|
message: "View created successfully.",
|
||||||
|
});
|
||||||
|
})
|
||||||
.catch(() =>
|
.catch(() =>
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
type: "error",
|
type: "error",
|
||||||
|
Loading…
Reference in New Issue
Block a user