Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -6,7 +6,6 @@ import {useLingui} from '@lingui/react'
|
||||
import {wait} from '#/lib/async/wait'
|
||||
import {isNetworkError, useCleanError} from '#/lib/hooks/useCleanError'
|
||||
import {logger} from '#/logger'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {atoms as a, useTheme, web} from '#/alf'
|
||||
import {Admonition} from '#/components/Admonition'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
@@ -14,6 +13,7 @@ import * as Dialog from '#/components/Dialog'
|
||||
import {PinLocation_Stroke2_Corner0_Rounded as LocationIcon} from '#/components/icons/PinLocation'
|
||||
import {Loader} from '#/components/Loader'
|
||||
import {Text} from '#/components/Typography'
|
||||
import {IS_WEB} from '#/env'
|
||||
import {type Geolocation, useRequestDeviceGeolocation} from '#/geolocation'
|
||||
|
||||
export type Props = {
|
||||
@@ -138,7 +138,7 @@ function DeviceLocationRequestDialogInner({onLocationAcquired}: Props) {
|
||||
disabled={isRequesting}
|
||||
label={_(msg`Allow location access`)}
|
||||
onPress={onPressConfirm}
|
||||
size={isWeb ? 'small' : 'large'}
|
||||
size={IS_WEB ? 'small' : 'large'}
|
||||
color="primary">
|
||||
<ButtonIcon icon={isRequesting ? Loader : LocationIcon} />
|
||||
<ButtonText>
|
||||
@@ -147,11 +147,11 @@ function DeviceLocationRequestDialogInner({onLocationAcquired}: Props) {
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{!isWeb && (
|
||||
{!IS_WEB && (
|
||||
<Button
|
||||
label={_(msg`Cancel`)}
|
||||
onPress={() => close()}
|
||||
size={isWeb ? 'small' : 'large'}
|
||||
size={IS_WEB ? 'small' : 'large'}
|
||||
color="secondary">
|
||||
<ButtonText>
|
||||
<Trans>Cancel</Trans>
|
||||
|
||||
Reference in New Issue
Block a user