about summary refs log tree commit diff
path: root/src/platform/urls.tsx
blob: 958b5232d6582841162418ef3a96b7935fd65d78 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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}`
  }
}