diff --git a/src/AppMenu.tsx b/src/AppMenu.tsx index 1eec669f2a..e094889431 100644 --- a/src/AppMenu.tsx +++ b/src/AppMenu.tsx @@ -22,7 +22,6 @@ import { path } from "@tauri-apps/api"; import { confirm } from "@tauri-apps/plugin-dialog"; import { observer } from "mobx-react"; import { Component } from "react"; -import { toast } from "react-toastify"; import { newProject, saveProjectDialog, @@ -52,7 +51,6 @@ class AppMenu extends Component { CopyToClipboardButton({ data, tooltip }: { data: any; tooltip: string }) { const handleAction = async function () { await navigator.clipboard.writeText(data); - toast.success("Copied to clipboard"); }; return ( diff --git a/src/document/DocumentManager.ts b/src/document/DocumentManager.ts index 9a861de60c..e6cb4db8e5 100644 --- a/src/document/DocumentManager.ts +++ b/src/document/DocumentManager.ts @@ -726,10 +726,9 @@ export async function generateAndExport(uuid: string) { export async function generateWithToastsAndExport(uuid: string) { tracing.debug("generateWithToastsAndExport", uuid); - const pathName = doc.pathlist.paths.get(uuid)?.name; + await doc.generatePathWithToasts(uuid); await toast.promise(writeTrajectory(uuid), { - success: `Saved "${pathName}" to ${uiState.projectDir}.`, error: { render(toastProps) { tracing.error(toastProps.data); diff --git a/src/document/DocumentModel.tsx b/src/document/DocumentModel.tsx index 579fd813fd..a59be6e1d4 100644 --- a/src/document/DocumentModel.tsx +++ b/src/document/DocumentModel.tsx @@ -298,12 +298,6 @@ export const DocumentStore = types toast.error("Tried to generate unknown path."); } return toast.promise(self.generatePath(activePathUUID), { - success: { - render({ data, toastProps }) { - return `Generated "${pathName}"`; - } - }, - error: { render({ data, toastProps }) { tracing.error("generatePathWithToasts:", data);