mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix
This commit is contained in:
parent
1db2869906
commit
f3b6e9b09f
1 changed files with 11 additions and 0 deletions
11
packages/excalidraw/data/filename.ts
Normal file
11
packages/excalidraw/data/filename.ts
Normal file
|
@ -0,0 +1,11 @@
|
|||
import { EDITOR_LS_KEYS } from "../constants";
|
||||
import { t } from "../i18n";
|
||||
import { getDateTime } from "../utils";
|
||||
import { EditorLocalStorage } from "./EditorLocalStorage";
|
||||
|
||||
export const getFileName = () => {
|
||||
return (
|
||||
EditorLocalStorage.get<string>(EDITOR_LS_KEYS.EXCALIDRAW_FILE_NAME) ||
|
||||
`${t("labels.untitled")}-${getDateTime()}`
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue