remove dependency of i18n from getDefaultAppState and make it pure

This commit is contained in:
Aakansha Doshi 2020-12-27 18:18:07 +05:30
parent bc414ccaaf
commit eda35a25b3
15 changed files with 123 additions and 90 deletions

View file

@ -1,7 +1,5 @@
import oc from "open-color";
import { AppState, FlooredNumber, NormalizedZoomValue } from "./types";
import { getDateTime } from "./utils";
import { t } from "./i18n";
import {
DEFAULT_FONT_SIZE,
DEFAULT_FONT_FAMILY,
@ -46,7 +44,7 @@ export const getDefaultAppState = (): Omit<
scrollY: 0 as FlooredNumber,
cursorButton: "up",
scrolledOutside: false,
name: `${t("labels.untitled")}-${getDateTime()}`,
name: "",
isBindingEnabled: true,
isResizing: false,
isRotating: false,