diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-06-14 20:29:24 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-06-14 20:29:24 -0500 |
commit | b2dd8d4f440243ac2eb12e7013d5a024b4e95f07 (patch) | |
tree | 42f78d330e2863a3229666c7d5fa09bec611e35b /src/platform | |
parent | 5066f3ba815d586f7d0f30135166aacf937480d6 (diff) | |
download | voidsky-b2dd8d4f440243ac2eb12e7013d5a024b4e95f07.tar.zst |
Open login flow in in-app browser for native (WIP)
Diffstat (limited to 'src/platform')
-rw-r--r-- | src/platform/urls.tsx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/platform/urls.tsx b/src/platform/urls.tsx new file mode 100644 index 000000000..958b5232d --- /dev/null +++ b/src/platform/urls.tsx @@ -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}` + } +} |