-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
43 lines (39 loc) · 1.42 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Login from './screens/Login';
import Signup from './screens/Signup';
import {NavigationContainer} from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack';
import HomeScreen from './screens/HomeScreen';
import Chats from './screens/Chats';
import Profile from './screens/Profile';
import { AuthProvider, userauth } from './context/AuthContext';
import Privaterote from './routes/ProtectedRoute';
import Addpost from './screens/Addpost';
import Messages from './components/Messages';
export default function App() {
const Stack = createStackNavigator();
return (
<AuthProvider>
<NavigationContainer>
<Stack.Navigator initialRouteName='login' screenOptions={{headerShown:false}}>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name='chats' component={Chats}/>
<Stack.Screen name='addpost' component={Addpost}/>
<Stack.Screen name="login" component={Login} />
<Stack.Screen name="signup" component={Signup} />
<Stack.Screen name="messages" component={Messages} />
<Stack.Screen name='profile' component={Profile}/>
</Stack.Navigator>
</NavigationContainer>
</AuthProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});