Open login flow in in-app browser for native (WIP)

This commit is contained in:
Paul Frazee 2022-06-14 20:29:24 -05:00
parent 5066f3ba81
commit b2dd8d4f44
5 changed files with 95 additions and 43 deletions

12
src/platform/urls.tsx Normal file
View 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}`
}
}