mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-1086] chore: update toast messages for consistency. (#4384)
This commit is contained in:
parent
2aef40b7c5
commit
f5f683b8b8
@ -58,7 +58,7 @@ export const DeleteApiTokenModal: FC<Props> = (props) => {
|
||||
.catch((err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.message ?? "Something went wrong. Please try again.",
|
||||
})
|
||||
)
|
||||
|
@ -76,7 +76,7 @@ export const CreateApiTokenModal: React.FC<Props> = (props) => {
|
||||
.catch((err) => {
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err.message,
|
||||
});
|
||||
|
||||
|
@ -39,7 +39,7 @@ export const TransferIssuesModal: React.FC<Props> = observer((props) => {
|
||||
.then(() => {
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Issues transferred successfully",
|
||||
title: "Success!",
|
||||
message: "Issues have been transferred successfully",
|
||||
});
|
||||
})
|
||||
|
@ -94,7 +94,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: `${TOAST_TYPE.SUCCESS}!`,
|
||||
title: `Success!`,
|
||||
message: "Issue created successfully.",
|
||||
});
|
||||
})
|
||||
@ -111,7 +111,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: `${TOAST_TYPE.ERROR}!`,
|
||||
title: `Error!`,
|
||||
message: "Some error occurred. Please try again.",
|
||||
});
|
||||
});
|
||||
|
@ -99,7 +99,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: `${TOAST_TYPE.SUCCESS}!`,
|
||||
title: `Success!`,
|
||||
message: "Issue created successfully.",
|
||||
});
|
||||
descriptionEditorRef?.current?.clearEditor();
|
||||
@ -118,7 +118,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: `${TOAST_TYPE.ERROR}!`,
|
||||
title: `Error!`,
|
||||
message: "Some error occurred. Please try again.",
|
||||
});
|
||||
});
|
||||
|
@ -42,7 +42,7 @@ export const InstanceAIForm: FC<IInstanceAIForm> = (props) => {
|
||||
.updateInstanceConfigurations(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "AI Settings updated successfully",
|
||||
})
|
||||
|
@ -53,7 +53,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => {
|
||||
.updateInstanceConfigurations(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Email Settings updated successfully",
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export const InstanceGeneralForm: FC<IInstanceGeneralForm> = (props) => {
|
||||
.updateInstanceInfo(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Settings updated successfully",
|
||||
})
|
||||
|
@ -42,7 +42,7 @@ export const InstanceGithubConfigForm: FC<IInstanceGithubConfigForm> = (props) =
|
||||
.updateInstanceConfigurations(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Github Configuration Settings updated successfully",
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export const InstanceGoogleConfigForm: FC<IInstanceGoogleConfigForm> = (props) =
|
||||
.updateInstanceConfigurations(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Google Configuration Settings updated successfully",
|
||||
})
|
||||
|
@ -40,7 +40,7 @@ export const InstanceImageConfigForm: FC<IInstanceImageConfigForm> = (props) =>
|
||||
.updateInstanceConfigurations(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Image Configuration Settings updated successfully",
|
||||
})
|
||||
|
@ -53,13 +53,13 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
|
||||
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
|
||||
await createComment(workspaceSlug, projectId, issueId, data);
|
||||
setToast({
|
||||
title: "Comment created successfully.",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Comment created successfully.",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Comment creation failed.",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Comment creation failed. Please try again later.",
|
||||
});
|
||||
@ -70,13 +70,13 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
|
||||
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
|
||||
await updateComment(workspaceSlug, projectId, issueId, commentId, data);
|
||||
setToast({
|
||||
title: "Comment updated successfully.",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Comment updated successfully.",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Comment update failed.",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Comment update failed. Please try again later.",
|
||||
});
|
||||
@ -87,13 +87,13 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
|
||||
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
|
||||
await removeComment(workspaceSlug, projectId, issueId, commentId);
|
||||
setToast({
|
||||
title: "Comment removed successfully.",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Comment removed successfully.",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Comment remove failed.",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Comment remove failed. Please try again later.",
|
||||
});
|
||||
|
@ -73,7 +73,7 @@ export const LabelCreate: FC<ILabelCreate> = (props) => {
|
||||
reset(defaultValues);
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Label creation failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Label creation failed. Please try again sometime later.",
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ export const IssueLabel: FC<TIssueLabel> = observer((props) => {
|
||||
else await updateIssue(workspaceSlug, projectId, issueId, data);
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Issue update failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Issue update failed",
|
||||
});
|
||||
@ -54,14 +54,14 @@ export const IssueLabel: FC<TIssueLabel> = observer((props) => {
|
||||
const labelResponse = await createLabel(workspaceSlug, projectId, data);
|
||||
if (!isInboxIssue)
|
||||
setToast({
|
||||
title: "Label created successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Label created successfully",
|
||||
});
|
||||
return labelResponse;
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Label creation failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Label creation failed",
|
||||
});
|
||||
|
@ -66,7 +66,7 @@ export const IssueParentSelect: React.FC<TIssueParentSelect> = observer((props)
|
||||
} catch (error) {
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: "Something went wrong",
|
||||
});
|
||||
}
|
||||
|
@ -41,13 +41,13 @@ export const IssueCommentReaction: FC<TIssueCommentReaction> = observer((props)
|
||||
if (!workspaceSlug || !projectId || !commentId) throw new Error("Missing fields");
|
||||
await createCommentReaction(workspaceSlug, projectId, commentId, reaction);
|
||||
setToast({
|
||||
title: "Reaction created successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Reaction created successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Reaction creation failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Reaction creation failed",
|
||||
});
|
||||
@ -58,13 +58,13 @@ export const IssueCommentReaction: FC<TIssueCommentReaction> = observer((props)
|
||||
if (!workspaceSlug || !projectId || !commentId || !currentUser?.id) throw new Error("Missing fields");
|
||||
removeCommentReaction(workspaceSlug, projectId, commentId, reaction, currentUser.id);
|
||||
setToast({
|
||||
title: "Reaction removed successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Reaction removed successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Reaction remove failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Reaction remove failed",
|
||||
});
|
||||
|
@ -40,13 +40,13 @@ export const IssueReaction: FC<TIssueReaction> = observer((props) => {
|
||||
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
|
||||
await createReaction(workspaceSlug, projectId, issueId, reaction);
|
||||
setToast({
|
||||
title: "Reaction created successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Reaction created successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Reaction creation failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Reaction creation failed",
|
||||
});
|
||||
@ -57,13 +57,13 @@ export const IssueReaction: FC<TIssueReaction> = observer((props) => {
|
||||
if (!workspaceSlug || !projectId || !issueId || !currentUser?.id) throw new Error("Missing fields");
|
||||
await removeReaction(workspaceSlug, projectId, issueId, reaction, currentUser.id);
|
||||
setToast({
|
||||
title: "Reaction removed successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Reaction removed successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Reaction remove failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Reaction remove failed",
|
||||
});
|
||||
|
@ -111,7 +111,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
||||
path: router.asPath,
|
||||
});
|
||||
setToast({
|
||||
title: "Issue update failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Issue update failed",
|
||||
});
|
||||
@ -122,7 +122,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
||||
if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
||||
else await removeIssue(workspaceSlug, projectId, issueId);
|
||||
setToast({
|
||||
title: "Issue deleted successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Issue deleted successfully",
|
||||
});
|
||||
@ -133,7 +133,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Issue delete failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Issue delete failed",
|
||||
});
|
||||
|
@ -33,7 +33,7 @@ export const IssueSubscription: FC<TIssueSubscription> = observer((props) => {
|
||||
else await createSubscription(workspaceSlug, projectId, issueId);
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: `Issue ${isSubscribed ? `unsubscribed` : `subscribed`} successfully.!`,
|
||||
title: "Success!",
|
||||
message: `Issue ${isSubscribed ? `unsubscribed` : `subscribed`} successfully.!`,
|
||||
});
|
||||
setLoading(false);
|
||||
@ -41,7 +41,7 @@ export const IssueSubscription: FC<TIssueSubscription> = observer((props) => {
|
||||
setLoading(false);
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: "Something went wrong. Please try again later.",
|
||||
});
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {
|
||||
updateIssue
|
||||
).catch((err) => {
|
||||
setToast({
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: err?.detail ?? "Failed to perform this action",
|
||||
});
|
||||
|
@ -163,7 +163,7 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
|
||||
orderBy !== "sort_order"
|
||||
).catch((err) => {
|
||||
setToast({
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: err?.detail ?? "Failed to perform this action",
|
||||
});
|
||||
|
@ -105,7 +105,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
||||
path: router.asPath,
|
||||
});
|
||||
setToast({
|
||||
title: "Issue update failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Issue update failed",
|
||||
});
|
||||
@ -115,7 +115,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
||||
try {
|
||||
removeIssue(workspaceSlug, projectId, issueId);
|
||||
setToast({
|
||||
title: "Issue deleted successfully",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Issue deleted successfully",
|
||||
});
|
||||
@ -126,7 +126,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
title: "Issue delete failed",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Issue delete failed",
|
||||
});
|
||||
|
@ -143,7 +143,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
} catch (error) {
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error fetching sub-issues",
|
||||
title: "Error!",
|
||||
message: "Error fetching sub-issues",
|
||||
});
|
||||
}
|
||||
@ -153,13 +153,13 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
await createSubIssues(workspaceSlug, projectId, parentIssueId, issueIds);
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Sub-issues added successfully",
|
||||
title: "Success!",
|
||||
message: "Sub-issues added successfully",
|
||||
});
|
||||
} catch (error) {
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error adding sub-issue",
|
||||
title: "Error!",
|
||||
message: "Error adding sub-issue",
|
||||
});
|
||||
}
|
||||
@ -187,7 +187,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Sub-issue updated successfully",
|
||||
title: "Success!",
|
||||
message: "Sub-issue updated successfully",
|
||||
});
|
||||
setSubIssueHelpers(parentIssueId, "issue_loader", issueId);
|
||||
@ -203,7 +203,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error updating sub-issue",
|
||||
title: "Error!",
|
||||
message: "Error updating sub-issue",
|
||||
});
|
||||
}
|
||||
@ -214,7 +214,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId);
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Sub-issue removed successfully",
|
||||
title: "Success!",
|
||||
message: "Sub-issue removed successfully",
|
||||
});
|
||||
captureIssueEvent({
|
||||
@ -239,7 +239,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error removing sub-issue",
|
||||
title: "Error!",
|
||||
message: "Error removing sub-issue",
|
||||
});
|
||||
}
|
||||
@ -250,7 +250,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
await deleteSubIssue(workspaceSlug, projectId, parentIssueId, issueId);
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Issue deleted successfully",
|
||||
title: "Error!",
|
||||
message: "Issue deleted successfully",
|
||||
});
|
||||
captureIssueEvent({
|
||||
@ -267,7 +267,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error deleting issue",
|
||||
title: "Error!",
|
||||
message: "Error deleting issue",
|
||||
});
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Module link created",
|
||||
title: "Success!",
|
||||
message: "Module link created successfully.",
|
||||
});
|
||||
})
|
||||
@ -151,7 +151,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Module link updated",
|
||||
title: "Success!",
|
||||
message: "Module link updated successfully.",
|
||||
});
|
||||
})
|
||||
@ -175,7 +175,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
|
||||
});
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Module link deleted",
|
||||
title: "Success!",
|
||||
message: "Module link deleted successfully.",
|
||||
});
|
||||
})
|
||||
|
@ -99,7 +99,7 @@ export const SnoozeNotificationModal: FC<SnoozeModalProps> = (props) => {
|
||||
handleClose();
|
||||
onSuccess();
|
||||
setToast({
|
||||
title: "Notification snoozed",
|
||||
title: "Success!",
|
||||
message: "Notification snoozed successfully",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
});
|
||||
|
@ -91,7 +91,7 @@ export const PageOptionsDropdown: React.FC<Props> = observer((props) => {
|
||||
copyTextToClipboard(editorRef.getMarkDown()).then(() =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Successful!",
|
||||
title: "Success!",
|
||||
message: "Markdown copied to clipboard.",
|
||||
})
|
||||
);
|
||||
@ -106,7 +106,7 @@ export const PageOptionsDropdown: React.FC<Props> = observer((props) => {
|
||||
copyUrlToClipboard(`${workspaceSlug}/projects/${projectId}/pages/${id}`).then(() =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Successful!",
|
||||
title: "Success!",
|
||||
message: "Page link copied to clipboard.",
|
||||
})
|
||||
);
|
||||
|
@ -42,7 +42,7 @@ export const EmailNotificationForm: FC<IEmailNotificationFormProps> = (props) =>
|
||||
.updateCurrentUserEmailNotificationSettings(payload)
|
||||
.then(() =>
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Email Notification Settings updated successfully",
|
||||
})
|
||||
|
@ -58,7 +58,7 @@ export const ProjectMemberListItem: React.FC<Props> = observer((props) => {
|
||||
.catch((err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.error || "Something went wrong. Please try again.",
|
||||
})
|
||||
);
|
||||
@ -67,7 +67,7 @@ export const ProjectMemberListItem: React.FC<Props> = observer((props) => {
|
||||
(err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.error || "Something went wrong. Please try again.",
|
||||
})
|
||||
);
|
||||
|
@ -72,7 +72,7 @@ export const ProjectSettingsMemberDefaults: React.FC = observer(() => {
|
||||
})
|
||||
.then(() => {
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Project updated successfully",
|
||||
});
|
||||
|
@ -81,7 +81,7 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
|
||||
if (onSuccess) onSuccess();
|
||||
onClose();
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Members added successfully.",
|
||||
});
|
||||
|
@ -41,14 +41,14 @@ export const WorkspaceInvitationsListItem: FC<Props> = observer((props) => {
|
||||
.then(() => {
|
||||
setToast({
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
message: "Invitation removed successfully.",
|
||||
});
|
||||
})
|
||||
.catch((err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.error || "Something went wrong. Please try again.",
|
||||
})
|
||||
);
|
||||
|
@ -54,7 +54,7 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
||||
.catch((err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.error || "Something went wrong. Please try again.",
|
||||
})
|
||||
);
|
||||
@ -66,7 +66,7 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
||||
await removeMemberFromWorkspace(workspaceSlug.toString(), memberDetails.member.id).catch((err) =>
|
||||
setToast({
|
||||
type: TOAST_TYPE.ERROR,
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
message: err?.error || "Something went wrong. Please try again.",
|
||||
})
|
||||
);
|
||||
|
@ -75,7 +75,7 @@ export const WorkspaceDetails: FC = observer(() => {
|
||||
},
|
||||
});
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "Workspace updated successfully",
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ const InstanceAdminAuthorizationPage: NextPageWithLayout = observer(() => {
|
||||
await updateInstanceConfigurations(payload)
|
||||
.then(() => {
|
||||
setToast({
|
||||
title: "Success",
|
||||
title: "Success!",
|
||||
type: TOAST_TYPE.SUCCESS,
|
||||
message: "SSO and OAuth Settings updated successfully",
|
||||
});
|
||||
@ -52,7 +52,7 @@ const InstanceAdminAuthorizationPage: NextPageWithLayout = observer(() => {
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
setToast({
|
||||
title: "Error",
|
||||
title: "Error!",
|
||||
type: TOAST_TYPE.ERROR,
|
||||
message: "Failed to update SSO and OAuth Settings",
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user