[WEB-1086] chore: update toast messages for consistency. (#4384)

This commit is contained in:
Prateek Shourya 2024-05-07 15:03:24 +05:30 committed by GitHub
parent 2aef40b7c5
commit f5f683b8b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 69 additions and 69 deletions

View File

@ -58,7 +58,7 @@ export const DeleteApiTokenModal: FC<Props> = (props) => {
.catch((err) => .catch((err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.message ?? "Something went wrong. Please try again.", message: err?.message ?? "Something went wrong. Please try again.",
}) })
) )

View File

@ -76,7 +76,7 @@ export const CreateApiTokenModal: React.FC<Props> = (props) => {
.catch((err) => { .catch((err) => {
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err.message, message: err.message,
}); });

View File

@ -39,7 +39,7 @@ export const TransferIssuesModal: React.FC<Props> = observer((props) => {
.then(() => { .then(() => {
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Issues transferred successfully", title: "Success!",
message: "Issues have been transferred successfully", message: "Issues have been transferred successfully",
}); });
}) })

View File

@ -94,7 +94,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: `${TOAST_TYPE.SUCCESS}!`, title: `Success!`,
message: "Issue created successfully.", message: "Issue created successfully.",
}); });
}) })
@ -111,7 +111,7 @@ export const InboxIssueCreateRoot: FC<TInboxIssueCreateRoot> = observer((props)
}); });
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: `${TOAST_TYPE.ERROR}!`, title: `Error!`,
message: "Some error occurred. Please try again.", message: "Some error occurred. Please try again.",
}); });
}); });

View File

@ -99,7 +99,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: `${TOAST_TYPE.SUCCESS}!`, title: `Success!`,
message: "Issue created successfully.", message: "Issue created successfully.",
}); });
descriptionEditorRef?.current?.clearEditor(); descriptionEditorRef?.current?.clearEditor();
@ -118,7 +118,7 @@ export const InboxIssueEditRoot: FC<TInboxIssueEditRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: `${TOAST_TYPE.ERROR}!`, title: `Error!`,
message: "Some error occurred. Please try again.", message: "Some error occurred. Please try again.",
}); });
}); });

View File

@ -42,7 +42,7 @@ export const InstanceAIForm: FC<IInstanceAIForm> = (props) => {
.updateInstanceConfigurations(payload) .updateInstanceConfigurations(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "AI Settings updated successfully", message: "AI Settings updated successfully",
}) })

View File

@ -53,7 +53,7 @@ export const InstanceEmailForm: FC<IInstanceEmailForm> = (props) => {
.updateInstanceConfigurations(payload) .updateInstanceConfigurations(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Email Settings updated successfully", message: "Email Settings updated successfully",
}) })

View File

@ -40,7 +40,7 @@ export const InstanceGeneralForm: FC<IInstanceGeneralForm> = (props) => {
.updateInstanceInfo(payload) .updateInstanceInfo(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Settings updated successfully", message: "Settings updated successfully",
}) })

View File

@ -42,7 +42,7 @@ export const InstanceGithubConfigForm: FC<IInstanceGithubConfigForm> = (props) =
.updateInstanceConfigurations(payload) .updateInstanceConfigurations(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Github Configuration Settings updated successfully", message: "Github Configuration Settings updated successfully",
}) })

View File

@ -40,7 +40,7 @@ export const InstanceGoogleConfigForm: FC<IInstanceGoogleConfigForm> = (props) =
.updateInstanceConfigurations(payload) .updateInstanceConfigurations(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Google Configuration Settings updated successfully", message: "Google Configuration Settings updated successfully",
}) })

View File

@ -40,7 +40,7 @@ export const InstanceImageConfigForm: FC<IInstanceImageConfigForm> = (props) =>
.updateInstanceConfigurations(payload) .updateInstanceConfigurations(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Image Configuration Settings updated successfully", message: "Image Configuration Settings updated successfully",
}) })

View File

@ -53,13 +53,13 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields"); if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
await createComment(workspaceSlug, projectId, issueId, data); await createComment(workspaceSlug, projectId, issueId, data);
setToast({ setToast({
title: "Comment created successfully.", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Comment created successfully.", message: "Comment created successfully.",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Comment creation failed.", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Comment creation failed. Please try again later.", 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"); if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
await updateComment(workspaceSlug, projectId, issueId, commentId, data); await updateComment(workspaceSlug, projectId, issueId, commentId, data);
setToast({ setToast({
title: "Comment updated successfully.", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Comment updated successfully.", message: "Comment updated successfully.",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Comment update failed.", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Comment update failed. Please try again later.", 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"); if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
await removeComment(workspaceSlug, projectId, issueId, commentId); await removeComment(workspaceSlug, projectId, issueId, commentId);
setToast({ setToast({
title: "Comment removed successfully.", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Comment removed successfully.", message: "Comment removed successfully.",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Comment remove failed.", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Comment remove failed. Please try again later.", message: "Comment remove failed. Please try again later.",
}); });

View File

@ -73,7 +73,7 @@ export const LabelCreate: FC<ILabelCreate> = (props) => {
reset(defaultValues); reset(defaultValues);
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Label creation failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Label creation failed. Please try again sometime later.", message: "Label creation failed. Please try again sometime later.",
}); });

View File

@ -43,7 +43,7 @@ export const IssueLabel: FC<TIssueLabel> = observer((props) => {
else await updateIssue(workspaceSlug, projectId, issueId, data); else await updateIssue(workspaceSlug, projectId, issueId, data);
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Issue update failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Issue update failed", message: "Issue update failed",
}); });
@ -54,14 +54,14 @@ export const IssueLabel: FC<TIssueLabel> = observer((props) => {
const labelResponse = await createLabel(workspaceSlug, projectId, data); const labelResponse = await createLabel(workspaceSlug, projectId, data);
if (!isInboxIssue) if (!isInboxIssue)
setToast({ setToast({
title: "Label created successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Label created successfully", message: "Label created successfully",
}); });
return labelResponse; return labelResponse;
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Label creation failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Label creation failed", message: "Label creation failed",
}); });

View File

@ -66,7 +66,7 @@ export const IssueParentSelect: React.FC<TIssueParentSelect> = observer((props)
} catch (error) { } catch (error) {
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: "Something went wrong", message: "Something went wrong",
}); });
} }

View File

@ -41,13 +41,13 @@ export const IssueCommentReaction: FC<TIssueCommentReaction> = observer((props)
if (!workspaceSlug || !projectId || !commentId) throw new Error("Missing fields"); if (!workspaceSlug || !projectId || !commentId) throw new Error("Missing fields");
await createCommentReaction(workspaceSlug, projectId, commentId, reaction); await createCommentReaction(workspaceSlug, projectId, commentId, reaction);
setToast({ setToast({
title: "Reaction created successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Reaction created successfully", message: "Reaction created successfully",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Reaction creation failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Reaction creation failed", 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"); if (!workspaceSlug || !projectId || !commentId || !currentUser?.id) throw new Error("Missing fields");
removeCommentReaction(workspaceSlug, projectId, commentId, reaction, currentUser.id); removeCommentReaction(workspaceSlug, projectId, commentId, reaction, currentUser.id);
setToast({ setToast({
title: "Reaction removed successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Reaction removed successfully", message: "Reaction removed successfully",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Reaction remove failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Reaction remove failed", message: "Reaction remove failed",
}); });

View File

@ -40,13 +40,13 @@ export const IssueReaction: FC<TIssueReaction> = observer((props) => {
if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields"); if (!workspaceSlug || !projectId || !issueId) throw new Error("Missing fields");
await createReaction(workspaceSlug, projectId, issueId, reaction); await createReaction(workspaceSlug, projectId, issueId, reaction);
setToast({ setToast({
title: "Reaction created successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Reaction created successfully", message: "Reaction created successfully",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Reaction creation failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Reaction creation failed", 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"); if (!workspaceSlug || !projectId || !issueId || !currentUser?.id) throw new Error("Missing fields");
await removeReaction(workspaceSlug, projectId, issueId, reaction, currentUser.id); await removeReaction(workspaceSlug, projectId, issueId, reaction, currentUser.id);
setToast({ setToast({
title: "Reaction removed successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Reaction removed successfully", message: "Reaction removed successfully",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Reaction remove failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Reaction remove failed", message: "Reaction remove failed",
}); });

View File

@ -111,7 +111,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
path: router.asPath, path: router.asPath,
}); });
setToast({ setToast({
title: "Issue update failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Issue update failed", message: "Issue update failed",
}); });
@ -122,7 +122,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId); if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId);
else await removeIssue(workspaceSlug, projectId, issueId); else await removeIssue(workspaceSlug, projectId, issueId);
setToast({ setToast({
title: "Issue deleted successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Issue deleted successfully", message: "Issue deleted successfully",
}); });
@ -133,7 +133,7 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Issue delete failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Issue delete failed", message: "Issue delete failed",
}); });

View File

@ -33,7 +33,7 @@ export const IssueSubscription: FC<TIssueSubscription> = observer((props) => {
else await createSubscription(workspaceSlug, projectId, issueId); else await createSubscription(workspaceSlug, projectId, issueId);
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: `Issue ${isSubscribed ? `unsubscribed` : `subscribed`} successfully.!`, title: "Success!",
message: `Issue ${isSubscribed ? `unsubscribed` : `subscribed`} successfully.!`, message: `Issue ${isSubscribed ? `unsubscribed` : `subscribed`} successfully.!`,
}); });
setLoading(false); setLoading(false);
@ -41,7 +41,7 @@ export const IssueSubscription: FC<TIssueSubscription> = observer((props) => {
setLoading(false); setLoading(false);
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: "Something went wrong. Please try again later.", message: "Something went wrong. Please try again later.",
}); });
} }

View File

@ -71,7 +71,7 @@ export const BaseCalendarRoot = observer((props: IBaseCalendarRoot) => {
updateIssue updateIssue
).catch((err) => { ).catch((err) => {
setToast({ setToast({
title: "Error", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: err?.detail ?? "Failed to perform this action", message: err?.detail ?? "Failed to perform this action",
}); });

View File

@ -163,7 +163,7 @@ export const BaseKanBanRoot: React.FC<IBaseKanBanLayout> = observer((props: IBas
orderBy !== "sort_order" orderBy !== "sort_order"
).catch((err) => { ).catch((err) => {
setToast({ setToast({
title: "Error", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: err?.detail ?? "Failed to perform this action", message: err?.detail ?? "Failed to perform this action",
}); });

View File

@ -105,7 +105,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
path: router.asPath, path: router.asPath,
}); });
setToast({ setToast({
title: "Issue update failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Issue update failed", message: "Issue update failed",
}); });
@ -115,7 +115,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
try { try {
removeIssue(workspaceSlug, projectId, issueId); removeIssue(workspaceSlug, projectId, issueId);
setToast({ setToast({
title: "Issue deleted successfully", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Issue deleted successfully", message: "Issue deleted successfully",
}); });
@ -126,7 +126,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
title: "Issue delete failed", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Issue delete failed", message: "Issue delete failed",
}); });

View File

@ -143,7 +143,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
} catch (error) { } catch (error) {
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error fetching sub-issues", title: "Error!",
message: "Error fetching sub-issues", message: "Error fetching sub-issues",
}); });
} }
@ -153,13 +153,13 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
await createSubIssues(workspaceSlug, projectId, parentIssueId, issueIds); await createSubIssues(workspaceSlug, projectId, parentIssueId, issueIds);
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Sub-issues added successfully", title: "Success!",
message: "Sub-issues added successfully", message: "Sub-issues added successfully",
}); });
} catch (error) { } catch (error) {
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error adding sub-issue", title: "Error!",
message: "Error adding sub-issue", message: "Error adding sub-issue",
}); });
} }
@ -187,7 +187,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Sub-issue updated successfully", title: "Success!",
message: "Sub-issue updated successfully", message: "Sub-issue updated successfully",
}); });
setSubIssueHelpers(parentIssueId, "issue_loader", issueId); setSubIssueHelpers(parentIssueId, "issue_loader", issueId);
@ -203,7 +203,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error updating sub-issue", title: "Error!",
message: "Error updating sub-issue", message: "Error updating sub-issue",
}); });
} }
@ -214,7 +214,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId); await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId);
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Sub-issue removed successfully", title: "Success!",
message: "Sub-issue removed successfully", message: "Sub-issue removed successfully",
}); });
captureIssueEvent({ captureIssueEvent({
@ -239,7 +239,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error removing sub-issue", title: "Error!",
message: "Error removing sub-issue", message: "Error removing sub-issue",
}); });
} }
@ -250,7 +250,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
await deleteSubIssue(workspaceSlug, projectId, parentIssueId, issueId); await deleteSubIssue(workspaceSlug, projectId, parentIssueId, issueId);
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Issue deleted successfully", title: "Error!",
message: "Issue deleted successfully", message: "Issue deleted successfully",
}); });
captureIssueEvent({ captureIssueEvent({
@ -267,7 +267,7 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error deleting issue", title: "Error!",
message: "Error deleting issue", message: "Error deleting issue",
}); });
} }

View File

@ -125,7 +125,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Module link created", title: "Success!",
message: "Module link created successfully.", message: "Module link created successfully.",
}); });
}) })
@ -151,7 +151,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Module link updated", title: "Success!",
message: "Module link updated successfully.", message: "Module link updated successfully.",
}); });
}) })
@ -175,7 +175,7 @@ export const ModuleDetailsSidebar: React.FC<Props> = observer((props) => {
}); });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Module link deleted", title: "Success!",
message: "Module link deleted successfully.", message: "Module link deleted successfully.",
}); });
}) })

View File

@ -99,7 +99,7 @@ export const SnoozeNotificationModal: FC<SnoozeModalProps> = (props) => {
handleClose(); handleClose();
onSuccess(); onSuccess();
setToast({ setToast({
title: "Notification snoozed", title: "Success!",
message: "Notification snoozed successfully", message: "Notification snoozed successfully",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
}); });

View File

@ -91,7 +91,7 @@ export const PageOptionsDropdown: React.FC<Props> = observer((props) => {
copyTextToClipboard(editorRef.getMarkDown()).then(() => copyTextToClipboard(editorRef.getMarkDown()).then(() =>
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Successful!", title: "Success!",
message: "Markdown copied to clipboard.", message: "Markdown copied to clipboard.",
}) })
); );
@ -106,7 +106,7 @@ export const PageOptionsDropdown: React.FC<Props> = observer((props) => {
copyUrlToClipboard(`${workspaceSlug}/projects/${projectId}/pages/${id}`).then(() => copyUrlToClipboard(`${workspaceSlug}/projects/${projectId}/pages/${id}`).then(() =>
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Successful!", title: "Success!",
message: "Page link copied to clipboard.", message: "Page link copied to clipboard.",
}) })
); );

View File

@ -42,7 +42,7 @@ export const EmailNotificationForm: FC<IEmailNotificationFormProps> = (props) =>
.updateCurrentUserEmailNotificationSettings(payload) .updateCurrentUserEmailNotificationSettings(payload)
.then(() => .then(() =>
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Email Notification Settings updated successfully", message: "Email Notification Settings updated successfully",
}) })

View File

@ -58,7 +58,7 @@ export const ProjectMemberListItem: React.FC<Props> = observer((props) => {
.catch((err) => .catch((err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.error || "Something went wrong. Please try again.", message: err?.error || "Something went wrong. Please try again.",
}) })
); );
@ -67,7 +67,7 @@ export const ProjectMemberListItem: React.FC<Props> = observer((props) => {
(err) => (err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.error || "Something went wrong. Please try again.", message: err?.error || "Something went wrong. Please try again.",
}) })
); );

View File

@ -72,7 +72,7 @@ export const ProjectSettingsMemberDefaults: React.FC = observer(() => {
}) })
.then(() => { .then(() => {
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Project updated successfully", message: "Project updated successfully",
}); });

View File

@ -81,7 +81,7 @@ export const SendProjectInvitationModal: React.FC<Props> = observer((props) => {
if (onSuccess) onSuccess(); if (onSuccess) onSuccess();
onClose(); onClose();
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Members added successfully.", message: "Members added successfully.",
}); });

View File

@ -41,14 +41,14 @@ export const WorkspaceInvitationsListItem: FC<Props> = observer((props) => {
.then(() => { .then(() => {
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Success", title: "Success!",
message: "Invitation removed successfully.", message: "Invitation removed successfully.",
}); });
}) })
.catch((err) => .catch((err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.error || "Something went wrong. Please try again.", message: err?.error || "Something went wrong. Please try again.",
}) })
); );

View File

@ -54,7 +54,7 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
.catch((err) => .catch((err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.error || "Something went wrong. Please try again.", 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) => await removeMemberFromWorkspace(workspaceSlug.toString(), memberDetails.member.id).catch((err) =>
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: "Error", title: "Error!",
message: err?.error || "Something went wrong. Please try again.", message: err?.error || "Something went wrong. Please try again.",
}) })
); );

View File

@ -75,7 +75,7 @@ export const WorkspaceDetails: FC = observer(() => {
}, },
}); });
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "Workspace updated successfully", message: "Workspace updated successfully",
}); });

View File

@ -43,7 +43,7 @@ const InstanceAdminAuthorizationPage: NextPageWithLayout = observer(() => {
await updateInstanceConfigurations(payload) await updateInstanceConfigurations(payload)
.then(() => { .then(() => {
setToast({ setToast({
title: "Success", title: "Success!",
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
message: "SSO and OAuth Settings updated successfully", message: "SSO and OAuth Settings updated successfully",
}); });
@ -52,7 +52,7 @@ const InstanceAdminAuthorizationPage: NextPageWithLayout = observer(() => {
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
setToast({ setToast({
title: "Error", title: "Error!",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
message: "Failed to update SSO and OAuth Settings", message: "Failed to update SSO and OAuth Settings",
}); });