aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/frontend/src/RootStore.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/frontend/src/RootStore.tsx')
-rw-r--r--subprojects/frontend/src/RootStore.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/subprojects/frontend/src/RootStore.tsx b/subprojects/frontend/src/RootStore.tsx
index 5aa580d1..c1674a3c 100644
--- a/subprojects/frontend/src/RootStore.tsx
+++ b/subprojects/frontend/src/RootStore.tsx
@@ -2,6 +2,7 @@ import { getLogger } from 'loglevel';
2import { makeAutoObservable, runInAction } from 'mobx'; 2import { makeAutoObservable, runInAction } from 'mobx';
3import React, { createContext, useContext } from 'react'; 3import React, { createContext, useContext } from 'react';
4 4
5import PWAStore from './PWAStore';
5import type EditorStore from './editor/EditorStore'; 6import type EditorStore from './editor/EditorStore';
6import ThemeStore from './theme/ThemeStore'; 7import ThemeStore from './theme/ThemeStore';
7 8
@@ -10,17 +11,21 @@ const log = getLogger('RootStore');
10export default class RootStore { 11export default class RootStore {
11 editorStore: EditorStore | undefined; 12 editorStore: EditorStore | undefined;
12 13
14 readonly pwaStore: PWAStore;
15
13 readonly themeStore: ThemeStore; 16 readonly themeStore: ThemeStore;
14 17
15 constructor(initialValue: string) { 18 constructor(initialValue: string) {
19 this.pwaStore = new PWAStore();
16 this.themeStore = new ThemeStore(); 20 this.themeStore = new ThemeStore();
17 makeAutoObservable(this, { 21 makeAutoObservable(this, {
22 pwaStore: false,
18 themeStore: false, 23 themeStore: false,
19 }); 24 });
20 import('./editor/EditorStore') 25 import('./editor/EditorStore')
21 .then(({ default: EditorStore }) => { 26 .then(({ default: EditorStore }) => {
22 runInAction(() => { 27 runInAction(() => {
23 this.editorStore = new EditorStore(initialValue); 28 this.editorStore = new EditorStore(initialValue, this.pwaStore);
24 }); 29 });
25 }) 30 })
26 .catch((error) => { 31 .catch((error) => {