fix: initial state

This commit is contained in:
Arnošt Pleskot 2023-08-08 16:26:33 +02:00
parent 6e7c302974
commit 5d9d2afcb7
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,7 @@ import {
DEFAULT_FONT_FAMILY,
DEFAULT_FONT_SIZE,
DEFAULT_TEXT_ALIGN,
EXPORT_BACKGROUND_IMAGES,
EXPORT_SCALES,
THEME,
} from "./constants";
@ -100,7 +101,8 @@ export const getDefaultAppState = (): Omit<
pendingImageElementId: null,
showHyperlinkPopup: false,
selectedLinearElement: null,
exportBackgroundImage: DEFAULT_EXPORT_BACKGROUND_IMAGE,
exportBackgroundImage:
EXPORT_BACKGROUND_IMAGES[DEFAULT_EXPORT_BACKGROUND_IMAGE].path,
};
};

View File

@ -287,7 +287,7 @@ export type AppState = {
pendingImageElementId: ExcalidrawImageElement["id"] | null;
showHyperlinkPopup: false | "info" | "editor";
selectedLinearElement: LinearElementEditor | null;
exportBackgroundImage: string;
exportBackgroundImage: string | null;
};
export type UIAppState = Omit<