feat: Closing of "Save to.." Dialog on Save To Disk (#7168)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Vaibhav Shukla
2023-10-19 23:21:50 +05:30
committed by GitHub
parent 83f86e2b86
commit b1cac35269
5 changed files with 37 additions and 13 deletions

View File

@ -80,7 +80,8 @@ export const ExportToExcalidrawPlus: React.FC<{
appState: Partial<AppState>;
files: BinaryFiles;
onError: (error: Error) => void;
}> = ({ elements, appState, files, onError }) => {
onSuccess: () => void;
}> = ({ elements, appState, files, onError, onSuccess }) => {
const { t } = useI18n();
return (
<Card color="primary">
@ -107,6 +108,7 @@ export const ExportToExcalidrawPlus: React.FC<{
try {
trackEvent("export", "eplus", `ui (${getFrame()})`);
await exportToExcalidrawPlus(elements, appState, files);
onSuccess();
} catch (error: any) {
console.error(error);
if (error.name !== "AbortError") {