diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-06-09 17:13:29 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-06-09 17:13:29 -0500 |
commit | 802222fe7181303d710607129e1c74427f07c97c (patch) | |
tree | 169b0878ed5d60f511fcf188df5118c0f446a37d /src/state/index.ts | |
parent | fc3b2952bb59b80665ebb53ffb3377f647ccdbd3 (diff) | |
download | voidsky-802222fe7181303d710607129e1c74427f07c97c.tar.zst |
Add auth navigations
Diffstat (limited to 'src/state/index.ts')
-rw-r--r-- | src/state/index.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/state/index.ts b/src/state/index.ts index 7c97ce294..496f3631d 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -1,5 +1,9 @@ import {onSnapshot} from 'mobx-state-tree' -import {RootStoreModel, RootStore} from './models/root-store' +import { + RootStoreModel, + RootStore, + createDefaultRootStore, +} from './models/root-store' import {Environment} from './env' import * as storage from './storage' @@ -15,7 +19,7 @@ export async function setupState() { rootStore = RootStoreModel.create(data, env) } catch (e) { console.error('Failed to load state from storage', e) - rootStore = RootStoreModel.create({}, env) + rootStore = RootStoreModel.create(createDefaultRootStore(), env) } // track changes & save to storage |