fix pwi at 1300px (#8238)
This commit is contained in:
@@ -5,21 +5,21 @@ import {View} from 'react-native'
|
|||||||
// Copyright (c) 2017 React Navigation Contributors
|
// Copyright (c) 2017 React Navigation Contributors
|
||||||
import {
|
import {
|
||||||
createNavigatorFactory,
|
createNavigatorFactory,
|
||||||
EventArg,
|
type EventArg,
|
||||||
ParamListBase,
|
type ParamListBase,
|
||||||
StackActionHelpers,
|
type StackActionHelpers,
|
||||||
StackActions,
|
StackActions,
|
||||||
StackNavigationState,
|
type StackNavigationState,
|
||||||
StackRouter,
|
StackRouter,
|
||||||
StackRouterOptions,
|
type StackRouterOptions,
|
||||||
useNavigationBuilder,
|
useNavigationBuilder,
|
||||||
} from '@react-navigation/native'
|
} from '@react-navigation/native'
|
||||||
import type {
|
import {
|
||||||
NativeStackNavigationEventMap,
|
type NativeStackNavigationEventMap,
|
||||||
NativeStackNavigationOptions,
|
type NativeStackNavigationOptions,
|
||||||
} from '@react-navigation/native-stack'
|
} from '@react-navigation/native-stack'
|
||||||
import {NativeStackView} from '@react-navigation/native-stack'
|
import {NativeStackView} from '@react-navigation/native-stack'
|
||||||
import type {NativeStackNavigatorProps} from '@react-navigation/native-stack/src/types'
|
import {type NativeStackNavigatorProps} from '@react-navigation/native-stack/src/types'
|
||||||
|
|
||||||
import {PWI_ENABLED} from '#/lib/build-flags'
|
import {PWI_ENABLED} from '#/lib/build-flags'
|
||||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||||
@@ -35,7 +35,7 @@ import {Deactivated} from '#/screens/Deactivated'
|
|||||||
import {Onboarding} from '#/screens/Onboarding'
|
import {Onboarding} from '#/screens/Onboarding'
|
||||||
import {SignupQueued} from '#/screens/SignupQueued'
|
import {SignupQueued} from '#/screens/SignupQueued'
|
||||||
import {Takendown} from '#/screens/Takendown'
|
import {Takendown} from '#/screens/Takendown'
|
||||||
import {atoms as a} from '#/alf'
|
import {atoms as a, useLayoutBreakpoints} from '#/alf'
|
||||||
import {BottomBarWeb} from './bottom-bar/BottomBarWeb'
|
import {BottomBarWeb} from './bottom-bar/BottomBarWeb'
|
||||||
import {DesktopLeftNav} from './desktop/LeftNav'
|
import {DesktopLeftNav} from './desktop/LeftNav'
|
||||||
import {DesktopRightNav} from './desktop/RightNav'
|
import {DesktopRightNav} from './desktop/RightNav'
|
||||||
@@ -101,7 +101,8 @@ function NativeStackNavigator({
|
|||||||
const onboardingState = useOnboardingState()
|
const onboardingState = useOnboardingState()
|
||||||
const {showLoggedOut} = useLoggedOutView()
|
const {showLoggedOut} = useLoggedOutView()
|
||||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||||
const {isMobile, isTabletOrMobile} = useWebMediaQueries()
|
const {isMobile} = useWebMediaQueries()
|
||||||
|
const {leftNavMinimal} = useLayoutBreakpoints()
|
||||||
if (!hasSession && (!PWI_ENABLED || activeRouteRequiresAuth || isNative)) {
|
if (!hasSession && (!PWI_ENABLED || activeRouteRequiresAuth || isNative)) {
|
||||||
return <LoggedOut />
|
return <LoggedOut />
|
||||||
}
|
}
|
||||||
@@ -138,7 +139,7 @@ function NativeStackNavigator({
|
|||||||
|
|
||||||
// Show the bottom bar if we have a session only on mobile web. If we don't have a session, we want to show it
|
// Show the bottom bar if we have a session only on mobile web. If we don't have a session, we want to show it
|
||||||
// on both tablet and mobile web so that we see the create account CTA.
|
// on both tablet and mobile web so that we see the create account CTA.
|
||||||
const showBottomBar = hasSession ? isMobile : isTabletOrMobile
|
const showBottomBar = hasSession ? isMobile : leftNavMinimal
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavigationContent>
|
<NavigationContent>
|
||||||
|
|||||||
@@ -571,7 +571,7 @@ export function DesktopLeftNav() {
|
|||||||
]}>
|
]}>
|
||||||
{hasSession ? (
|
{hasSession ? (
|
||||||
<ProfileCard />
|
<ProfileCard />
|
||||||
) : isDesktop ? (
|
) : !leftNavMinimal ? (
|
||||||
<View style={[a.pt_xl]}>
|
<View style={[a.pt_xl]}>
|
||||||
<NavSignupCard />
|
<NavSignupCard />
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user