Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -3,10 +3,10 @@ import {View} from 'react-native'
|
||||
import {PrivacySensitive} from 'expo-privacy-sensitive'
|
||||
|
||||
import {useAppState} from '#/lib/hooks/useAppState'
|
||||
import {isIOS} from '#/platform/detection'
|
||||
import {atoms as a, useTheme} from '#/alf'
|
||||
import {sizes as iconSizes} from '#/components/icons/common'
|
||||
import {Mark as Logo} from '#/components/icons/Logo'
|
||||
import {IS_IOS} from '#/env'
|
||||
|
||||
const ICON_SIZE = 'xl' as const
|
||||
|
||||
@@ -25,7 +25,7 @@ export function GrowthHack({
|
||||
|
||||
const appState = useAppState()
|
||||
|
||||
if (!isIOS || appState !== 'active') return children
|
||||
if (!IS_IOS || appState !== 'active') return children
|
||||
|
||||
return (
|
||||
<View
|
||||
|
||||
@@ -5,7 +5,6 @@ import {useLingui} from '@lingui/react'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {logger} from '#/logger'
|
||||
import {isIOS} from '#/platform/detection'
|
||||
import {useProfileShadow} from '#/state/cache/profile-shadow'
|
||||
import {
|
||||
useProfileFollowMutationQueue,
|
||||
@@ -17,10 +16,11 @@ import {atoms as a, useBreakpoints} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {Check_Stroke2_Corner0_Rounded as CheckIcon} from '#/components/icons/Check'
|
||||
import {PlusLarge_Stroke2_Corner0_Rounded as PlusIcon} from '#/components/icons/Plus'
|
||||
import {IS_IOS} from '#/env'
|
||||
import {GrowthHack} from './GrowthHack'
|
||||
|
||||
export function ThreadItemAnchorFollowButton({did}: {did: string}) {
|
||||
if (isIOS) {
|
||||
if (IS_IOS) {
|
||||
return (
|
||||
<GrowthHack>
|
||||
<ThreadItemAnchorFollowButtonInner did={did} />
|
||||
|
||||
Reference in New Issue
Block a user