Move /platform/detection vars into /env (#9707)

* Add platform vars to env

* Replace /platform/detection with /env
This commit is contained in:
Eric Bailey
2026-01-16 16:28:17 -06:00
committed by GitHub
parent bd510d8468
commit 0589bd7d9e
244 changed files with 789 additions and 789 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import React, {useContext} from 'react'
import {type SharedValue} from 'react-native-reanimated'
import {isNative} from '#/platform/detection'
import {IS_NATIVE} from '#/env'
export const PagerHeaderContext = React.createContext<{
scrollY: SharedValue<number>
@@ -37,7 +37,7 @@ export function PagerHeaderProvider({
export function usePagerHeaderContext() {
const ctx = useContext(PagerHeaderContext)
if (isNative) {
if (IS_NATIVE) {
if (!ctx) {
throw new Error(
'usePagerHeaderContext must be used within a HeaderProvider',
+3 -3
View File
@@ -18,13 +18,13 @@ import Animated, {
import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback'
import {ScrollProvider} from '#/lib/ScrollContext'
import {isIOS} from '#/platform/detection'
import {
Pager,
type PagerRef,
type RenderTabBarFnProps,
} from '#/view/com/pager/Pager'
import {useTheme} from '#/alf'
import {IS_IOS} from '#/env'
import {type ListMethods} from '../util/List'
import {PagerHeaderProvider} from './PagerHeaderContext'
import {TabBar} from './TabBar'
@@ -273,11 +273,11 @@ let PagerTabBar = ({
const headerRef = useRef(null)
return (
<Animated.View
pointerEvents={isIOS ? 'auto' : 'box-none'}
pointerEvents={IS_IOS ? 'auto' : 'box-none'}
style={[styles.tabBarMobile, headerTransform, t.atoms.bg]}>
<View
ref={headerRef}
pointerEvents={isIOS ? 'auto' : 'box-none'}
pointerEvents={IS_IOS ? 'auto' : 'box-none'}
collapsable={false}>
{renderHeader?.({setMinimumHeight: setMinimumHeaderHeight})}
{