Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import {Dimensions} from 'react-native'
|
||||
|
||||
import {isSafari} from '#/lib/browser'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {IS_WEB} from '#/env'
|
||||
|
||||
const {height: SCREEN_HEIGHT} = Dimensions.get('window')
|
||||
|
||||
const IFRAME_HOST = isWeb
|
||||
const IFRAME_HOST = IS_WEB
|
||||
? // @ts-ignore only for web
|
||||
window.location.host === 'localhost:8100'
|
||||
? 'http://localhost:8100'
|
||||
@@ -132,7 +132,7 @@ export function parseEmbedPlayerFromUrl(
|
||||
urlp.hostname === 'www.twitch.tv' ||
|
||||
urlp.hostname === 'm.twitch.tv'
|
||||
) {
|
||||
const parent = isWeb
|
||||
const parent = IS_WEB
|
||||
? // @ts-ignore only for web
|
||||
window.location.hostname
|
||||
: 'localhost'
|
||||
@@ -559,7 +559,7 @@ export function parseTenorGif(urlp: URL):
|
||||
width: Number(w),
|
||||
}
|
||||
|
||||
if (isWeb) {
|
||||
if (IS_WEB) {
|
||||
if (isSafari) {
|
||||
id = id.replace('AAAAC', 'AAAP1')
|
||||
filename = filename.replace('.gif', '.mp4')
|
||||
|
||||
Reference in New Issue
Block a user