Skip to content

Commit

Permalink
Stop a react-navigation warning. (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
NigelBreslaw committed Feb 26, 2024
1 parent bc3aa6a commit eb17d1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions native_gg/app/RootScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ const RootStack = createStackNavigator();
export default function RootScreen() {
const globalState = useGlobalStateContext();
const navigation = useNavigation();

const colorScheme = useColorScheme();

const themeBackgroundColor = colorScheme === "light" ? "white" : "#171321";
const themeTextColor = colorScheme === "light" ? "black" : "white";

useEffect(() => {
if (globalState.appReady && !globalState.authenticated) {
console.log("not authenticated so opening login");
navigation.navigate("Login" as never);
}
}, [globalState.authenticated, globalState.appReady, navigation]);
Expand All @@ -96,7 +94,7 @@ export default function RootScreen() {
/>
</RootStack.Group>
<RootStack.Group screenOptions={{ presentation: "modal", gestureEnabled: false, headerShown: false }}>
<RootStack.Screen name="Login" component={Login} />
<RootStack.Screen name="Login" component={Login} options={{ title: "Login" }} />
</RootStack.Group>
</RootStack.Navigator>
);
Expand Down

0 comments on commit eb17d1a

Please sign in to comment.