Move /platform/detection vars into /env (#9707)
* Add platform vars to env * Replace /platform/detection with /env
This commit is contained in:
@@ -27,7 +27,6 @@ import {
|
||||
|
||||
import {PWI_ENABLED} from '#/lib/build-flags'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {isNative, isWeb} from '#/platform/detection'
|
||||
import {useSession} from '#/state/session'
|
||||
import {useOnboardingState} from '#/state/shell'
|
||||
import {
|
||||
@@ -39,6 +38,7 @@ import {Onboarding} from '#/screens/Onboarding'
|
||||
import {SignupQueued} from '#/screens/SignupQueued'
|
||||
import {atoms as a, useLayoutBreakpoints} from '#/alf'
|
||||
import {PolicyUpdateOverlay} from '#/components/PolicyUpdateOverlay'
|
||||
import {IS_NATIVE, IS_WEB} from '#/env'
|
||||
import {BottomBarWeb} from './bottom-bar/BottomBarWeb'
|
||||
import {DesktopLeftNav} from './desktop/LeftNav'
|
||||
import {DesktopRightNav} from './desktop/RightNav'
|
||||
@@ -115,7 +115,7 @@ function NativeStackNavigator({
|
||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||
const {isMobile} = useWebMediaQueries()
|
||||
const {leftNavMinimal} = useLayoutBreakpoints()
|
||||
if (!hasSession && (!PWI_ENABLED || activeRouteRequiresAuth || isNative)) {
|
||||
if (!hasSession && (!PWI_ENABLED || activeRouteRequiresAuth || IS_NATIVE)) {
|
||||
return <LoggedOut />
|
||||
}
|
||||
if (hasSession && currentAccount?.signupQueued) {
|
||||
@@ -158,7 +158,7 @@ function NativeStackNavigator({
|
||||
describe={describe}
|
||||
/>
|
||||
</View>
|
||||
{isWeb && (
|
||||
{IS_WEB && (
|
||||
<>
|
||||
{showBottomBar ? <BottomBarWeb /> : <DesktopLeftNav />}
|
||||
{!isMobile && <DesktopRightNav routeName={activeRoute.name} />}
|
||||
|
||||
Reference in New Issue
Block a user