about summary refs log tree commit diff
path: root/src/App.web.tsx
diff options
context:
space:
mode:
authorMichael Staub <michael.staub@brightmachines.com>2023-02-23 13:52:12 -0800
committerMichael Staub <michael.staub@brightmachines.com>2023-02-23 13:52:12 -0800
commitf709c50809b17ce2ae6f789b728235495086e247 (patch)
tree6c0c0903217f1a708ea09118f7b30a4475d1aef0 /src/App.web.tsx
parenta014b4e6cbe9c397233c2ffe16c4417c68d1f15f (diff)
downloadvoidsky-f709c50809b17ce2ae6f789b728235495086e247.tar.zst
fix: browser history
Diffstat (limited to 'src/App.web.tsx')
-rw-r--r--src/App.web.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/App.web.tsx b/src/App.web.tsx
index 4f9fd3e53..1c6efba8f 100644
--- a/src/App.web.tsx
+++ b/src/App.web.tsx
@@ -1,5 +1,6 @@
 import React, {useState, useEffect} from 'react'
 import {SafeAreaProvider} from 'react-native-safe-area-context'
+import {getInitialURL} from 'platform/urls'
 import * as view from './view/index'
 import {RootStoreModel, setupState, RootStoreProvider} from './state'
 import {WebShell} from './view/shell/web'
@@ -13,7 +14,14 @@ function App() {
   // init
   useEffect(() => {
     view.setup()
-    setupState().then(setRootStore)
+    setupState().then(store => {
+      setRootStore(store)
+      getInitialURL().then(url => {
+        if (url) {
+          store.nav.handleLink(url)
+        }
+      })
+    })
   }, [])
 
   // show nothing prior to init