mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Update to browser-nativefs v0.1.0 (#523)
This commit is contained in:
parent
926b4f24e6
commit
d24b9c4d78
3 changed files with 5 additions and 13 deletions
|
@ -6,7 +6,7 @@ import { AppState } from "../types";
|
|||
import { ExportType } from "./types";
|
||||
import { getExportCanvasPreview } from "./getExportCanvasPreview";
|
||||
import nanoid from "nanoid";
|
||||
import { fileOpenPromise, fileSavePromise } from "browser-nativefs";
|
||||
import { fileOpen, fileSave } from "browser-nativefs";
|
||||
|
||||
import i18n from "../i18n";
|
||||
|
||||
|
@ -15,14 +15,6 @@ const LOCAL_STORAGE_KEY_STATE = "excalidraw-state";
|
|||
const BACKEND_POST = "https://json.excalidraw.com/api/v1/post/";
|
||||
const BACKEND_GET = "https://json.excalidraw.com/api/v1/";
|
||||
|
||||
let fileOpen: Function;
|
||||
let fileSave: Function;
|
||||
|
||||
(async () => {
|
||||
fileOpen = (await fileOpenPromise).default;
|
||||
fileSave = (await fileSavePromise).default;
|
||||
})();
|
||||
|
||||
// TODO: Defined globally, since file handles aren't yet serializable.
|
||||
// Once `FileSystemFileHandle` can be serialized, make this
|
||||
// part of `AppState`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue