-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
46 lines (40 loc) · 1.32 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
//App.js
import React, { useState } from 'react'
import {StyleSheet, View , Button, Text} from 'react-native'
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import Log from './Components/Log.component'
import { InterfacesWithDownBar } from './Components/Bars.component'
const Stack = createStackNavigator()
const MyStack = () => {
const [username, setUsername] = useState('')
const [accessToken, setAccessToken] = useState('')
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Home"
options={{
title: 'EPIMGUR MOBILE APP',
headerStyle: {
backgroundColor: 'rgb(231, 154, 35)',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
textAlign: 'center',
},
}}
>
{(props) => <Log {...props} setUsername={setUsername} setAccessToken={setAccessToken} />}
</Stack.Screen>
<Stack.Screen
name="Epimgur"
>
{(props) => <InterfacesWithDownBar {...props} username={username} accessToken={accessToken}/>}
</Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
};
export default MyStack;