persist file name to LS

This commit is contained in:
Aakansha Doshi 2024-02-05 19:26:52 +05:30
parent 1bb88cb5e9
commit 1db2869906
8 changed files with 25 additions and 18 deletions

View file

@ -23,8 +23,9 @@ import { FILE_UPLOAD_MAX_BYTES } from "../app_constants";
import { encodeFilesForUpload } from "../data/FileManager";
import { MIME_TYPES } from "../../packages/excalidraw/constants";
import { trackEvent } from "../../packages/excalidraw/analytics";
import { getDateTime, getFrame } from "../../packages/excalidraw/utils";
import { getFrame } from "../../packages/excalidraw/utils";
import { ExcalidrawLogo } from "../../packages/excalidraw/components/ExcalidrawLogo";
import { getFileName } from "../../packages/excalidraw/data/filename";
export const exportToExcalidrawPlus = async (
elements: readonly NonDeletedExcalidrawElement[],
@ -122,7 +123,7 @@ export const ExportToExcalidrawPlus: React.FC<{
elements,
appState,
files,
`${t("labels.untitled")}-${getDateTime()}`,
getFileName(),
);
onSuccess();
} catch (error: any) {