Sync browser navigation with app

This commit is contained in:
Paul Frazee 2023-02-24 17:47:53 -06:00
parent dcd396153c
commit 55a8a8fa4c
5 changed files with 68 additions and 30 deletions

View file

@ -1,5 +1,4 @@
import {Linking} from 'react-native'
import {createBrowserHistory, createMemoryHistory} from 'history'
import {isNative, isWeb} from './detection'
export async function getInitialURL(): Promise<string | undefined> {
@ -24,11 +23,3 @@ export function clearHash() {
window.location.hash = ''
}
}
export function getHistory() {
if (isWeb) {
return createBrowserHistory()
} else {
return createMemoryHistory()
}
}