-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.jsx
49 lines (46 loc) · 1.51 KB
/
App.jsx
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
import React from 'react';
import Home from './src/screens/Home';
import Email from './src/screens/Email';
import SignIn from './src/screens/SignIn';
import {SafeAreaView} from 'react-native';
import EmailCount from './src/screens/EmailCount';
import Statusbar from './src/components/Statusbar';
import {STANDARD_FLEX} from './src/config/constants';
import {createStackNavigator} from '@react-navigation/stack';
import {NavigationContainer} from '@react-navigation/native';
// Creating stack navigator
const Stack = createStackNavigator();
// Functional component
const App = () => {
// Returning JSX
return (
<>
<Statusbar barStyle="light-content" />
<SafeAreaView style={{flex: STANDARD_FLEX}}>
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerTitle: 'Demo - Sign in with phone',
headerTintColor: '#fff',
headerStyle: {backgroundColor: '#45B04E', elevation: 0},
}}>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Email" component={Email} />
<Stack.Screen
name="Sign In"
component={SignIn}
options={{headerLeft: null}}
/>
<Stack.Screen
name="Email Count"
component={EmailCount}
options={{headerLeft: null}}
/>
</Stack.Navigator>
</NavigationContainer>
</SafeAreaView>
</>
);
};
// Exporting component
export default App;