-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
61 lines (54 loc) · 1.86 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React, {useState} from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Dimensions,
} from 'react-native';
import {DrawerActions, NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import {createDrawerNavigator} from '@react-navigation/drawer';
import DrawerItem from '@react-navigation/drawer';
import 'react-native-gesture-handler';
import {signIn} from './SignIn';
import {Home} from './Home';
import {Register} from './Register';
import {Upcoming} from './Upcoming';
import { TVShows } from './TVShows';
import { ForgotPass } from './ForgotPass';
import { ChangePass } from './ChangePass';
import { Watchlist } from './Watchlist';
import { WatchlistTV } from './WatchlistTV';
const Stack = createStackNavigator();
const Drawer = createDrawerNavigator();
const {width, height} = Dimensions.get('window');
function DrawerRoutes() {
return (
<Drawer.Navigator initialRouteName="Home">
<Drawer.Screen name="Home" component={Home} />
<Drawer.Screen name="Upcoming Movies" component={Upcoming} />
<Drawer.Screen name="TV Shows" component={TVShows} />
<Drawer.Screen name="Watchlist" component={Watchlist} />
<Drawer.Screen name="TV Watchlist" component={WatchlistTV} />
</Drawer.Navigator>
);
}
const App = () => {
return (
<>
<NavigationContainer>
<Stack.Navigator screenOptions={{headerShown: false}}>
<Stack.Screen name="SignIn" component={signIn} />
<Stack.Screen name="Register" component={Register} />
<Stack.Screen name="ForgotPass" component={ForgotPass} />
<Stack.Screen name="ChangePass" component={ChangePass} />
<Stack.Screen name="Home" component={DrawerRoutes} />
</Stack.Navigator>
</NavigationContainer>
</>
);
};
export default App;