Open login flow in in-app browser for native (WIP)
This commit is contained in:
parent
5066f3ba81
commit
b2dd8d4f44
5 changed files with 95 additions and 43 deletions
12
src/platform/urls.tsx
Normal file
12
src/platform/urls.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
import {isIOS, isAndroid} from './detection'
|
||||
|
||||
export function makeAppUrl(path = '') {
|
||||
if (isIOS) {
|
||||
return `pubsqapp://${path}`
|
||||
} else if (isAndroid) {
|
||||
return `pubsq://app${path}`
|
||||
} else {
|
||||
// @ts-ignore window exists -prf
|
||||
return `${window.location.origin}${path}`
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue