From 5f8f4e6484faff23821ca7c009e309382fba914d Mon Sep 17 00:00:00 2001
From: Kristóf Marussy <kristof@marussy.com>
Date: Tue, 6 Sep 2022 22:32:04 +0200
Subject: feat(frontend): check for updates periodically

---
 subprojects/frontend/src/RootStore.tsx | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'subprojects/frontend/src/RootStore.tsx')

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';
 import { makeAutoObservable, runInAction } from 'mobx';
 import React, { createContext, useContext } from 'react';
 
+import PWAStore from './PWAStore';
 import type EditorStore from './editor/EditorStore';
 import ThemeStore from './theme/ThemeStore';
 
@@ -10,17 +11,21 @@ const log = getLogger('RootStore');
 export default class RootStore {
   editorStore: EditorStore | undefined;
 
+  readonly pwaStore: PWAStore;
+
   readonly themeStore: ThemeStore;
 
   constructor(initialValue: string) {
+    this.pwaStore = new PWAStore();
     this.themeStore = new ThemeStore();
     makeAutoObservable(this, {
+      pwaStore: false,
       themeStore: false,
     });
     import('./editor/EditorStore')
       .then(({ default: EditorStore }) => {
         runInAction(() => {
-          this.editorStore = new EditorStore(initialValue);
+          this.editorStore = new EditorStore(initialValue, this.pwaStore);
         });
       })
       .catch((error) => {
-- 
cgit v1.2.3-70-g09d2

