We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6db9d36 commit dc021a7Copy full SHA for dc021a7
frontend/navigation/AppNavigator.js
@@ -8,6 +8,8 @@ import MainNavigator from './MainNavigator';
8
9
const AppNavigator = () => {
10
const { token, isLoading } = useContext(AuthContext);
11
+ const scheme = useColorScheme();
12
+ const theme = scheme === 'dark' ? navThemeDark : navTheme;
13
14
if (isLoading) {
15
return (
@@ -17,8 +19,6 @@ const AppNavigator = () => {
17
19
);
18
20
}
21
- const scheme = useColorScheme();
- const theme = scheme === 'dark' ? navThemeDark : navTheme;
22
23
<NavigationContainer theme={theme}>
24
{token ? <MainNavigator /> : <AuthNavigator />}
0 commit comments