Add PWI build flag (#2082)

This commit is contained in:
Paul Frazee
2023-12-04 12:45:40 -08:00
committed by GitHub
parent a687d3f028
commit 971c402788
2 changed files with 3 additions and 1 deletions
@@ -1,5 +1,6 @@
import * as React from 'react'
import {View} from 'react-native'
import {PWI_ENABLED} from '#/lib/build-flags'
// Based on @react-navigation/native-stack/src/createNativeStackNavigator.ts
// MIT License
@@ -99,7 +100,7 @@ function NativeStackNavigator({
const {showLoggedOut} = useLoggedOutView()
const {setShowLoggedOut} = useLoggedOutViewControls()
const {isMobile} = useWebMediaQueries()
if (activeRouteRequiresAuth && !hasSession) {
if ((!PWI_ENABLED || activeRouteRequiresAuth) && !hasSession) {
return <LoggedOut />
}
if (showLoggedOut) {