Add PWI build flag (#2082)
This commit is contained in:
@@ -1 +1,2 @@
|
|||||||
export const LOGIN_INCLUDE_DEV_SERVERS = true
|
export const LOGIN_INCLUDE_DEV_SERVERS = true
|
||||||
|
export const PWI_ENABLED = false
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
|
import {PWI_ENABLED} from '#/lib/build-flags'
|
||||||
|
|
||||||
// Based on @react-navigation/native-stack/src/createNativeStackNavigator.ts
|
// Based on @react-navigation/native-stack/src/createNativeStackNavigator.ts
|
||||||
// MIT License
|
// MIT License
|
||||||
@@ -99,7 +100,7 @@ function NativeStackNavigator({
|
|||||||
const {showLoggedOut} = useLoggedOutView()
|
const {showLoggedOut} = useLoggedOutView()
|
||||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||||
const {isMobile} = useWebMediaQueries()
|
const {isMobile} = useWebMediaQueries()
|
||||||
if (activeRouteRequiresAuth && !hasSession) {
|
if ((!PWI_ENABLED || activeRouteRequiresAuth) && !hasSession) {
|
||||||
return <LoggedOut />
|
return <LoggedOut />
|
||||||
}
|
}
|
||||||
if (showLoggedOut) {
|
if (showLoggedOut) {
|
||||||
|
|||||||
Reference in New Issue
Block a user