diff options
author | Kirill Rogovoy <[email protected]> | 2021-07-19 20:06:08 +0300 |
---|---|---|
committer | Kirill Rogovoy <[email protected]> | 2021-07-19 20:06:08 +0300 |
commit | f0bf4e7afdcd8b02a62be45ab3e7d047ed865a79 (patch) | |
tree | 575c0ff2cbb846252bd2e494c81c396846aab2f6 /app/models/root-store | |
parent | 67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 (diff) |
Apply Prettier
Diffstat (limited to 'app/models/root-store')
-rw-r--r-- | app/models/root-store/root-store-context.ts | 4 | ||||
-rw-r--r-- | app/models/root-store/root-store.ts | 4 | ||||
-rw-r--r-- | app/models/root-store/setup-root-store.ts | 14 |
3 files changed, 12 insertions, 10 deletions
diff --git a/app/models/root-store/root-store-context.ts b/app/models/root-store/root-store-context.ts index 537e51c..f01a35c 100644 --- a/app/models/root-store/root-store-context.ts +++ b/app/models/root-store/root-store-context.ts @@ -1,5 +1,5 @@ -import { createContext, useContext } from "react" -import { RootStore } from "./root-store" +import { createContext, useContext } from 'react' +import { RootStore } from './root-store' /** * Create a context we can use to diff --git a/app/models/root-store/root-store.ts b/app/models/root-store/root-store.ts index 1131b48..56425bc 100644 --- a/app/models/root-store/root-store.ts +++ b/app/models/root-store/root-store.ts @@ -1,5 +1,5 @@ -import { Instance, SnapshotOut, types } from "mobx-state-tree" -import { CharacterStoreModel } from "../character-store/character-store" +import { Instance, SnapshotOut, types } from 'mobx-state-tree' +import { CharacterStoreModel } from '../character-store/character-store' /** * A RootStore model. diff --git a/app/models/root-store/setup-root-store.ts b/app/models/root-store/setup-root-store.ts index 4a6d0c5..b1a741b 100644 --- a/app/models/root-store/setup-root-store.ts +++ b/app/models/root-store/setup-root-store.ts @@ -1,12 +1,12 @@ -import { onSnapshot } from "mobx-state-tree" -import { RootStoreModel, RootStore } from "./root-store" -import { Environment } from "../environment" -import * as storage from "../../utils/storage" +import { onSnapshot } from 'mobx-state-tree' +import { RootStoreModel, RootStore } from './root-store' +import { Environment } from '../environment' +import * as storage from '../../utils/storage' /** * The key we'll be saving our state as within async storage. */ -const ROOT_STATE_STORAGE_KEY = "root" +const ROOT_STATE_STORAGE_KEY = 'root' /** * Setup the environment that all the models will be sharing. @@ -49,7 +49,9 @@ export async function setupRootStore() { } // track changes & save to storage - onSnapshot(rootStore, (snapshot) => storage.save(ROOT_STATE_STORAGE_KEY, snapshot)) + onSnapshot(rootStore, (snapshot) => + storage.save(ROOT_STATE_STORAGE_KEY, snapshot), + ) return rootStore } |