Sync browser navigation with app
This commit is contained in:
parent
dcd396153c
commit
55a8a8fa4c
5 changed files with 68 additions and 30 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue