Skip to content

Commit d288748

Browse files
I've removed the nested NavigationContainer from AppNavigator.js to fix the warning about having multiple navigation containers. The root NavigationContainer is now in App.js.
1 parent 2e0cb32 commit d288748

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

frontend/navigation/AppNavigator.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useContext } from 'react';
2-
import { NavigationContainer } from '@react-navigation/native';
32
import { View, ActivityIndicator, StyleSheet } from 'react-native';
43
import { AuthContext } from '../context/AuthContext';
54
import AuthNavigator from './AuthNavigator';
@@ -16,11 +15,7 @@ const AppNavigator = () => {
1615
);
1716
}
1817

19-
return (
20-
<NavigationContainer>
21-
{token ? <MainNavigator /> : <AuthNavigator />}
22-
</NavigationContainer>
23-
);
18+
return token ? <MainNavigator /> : <AuthNavigator />;
2419
};
2520

2621
const styles = StyleSheet.create({

0 commit comments

Comments
 (0)