-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
59 lines (48 loc) · 1.53 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
import React, { useState } from 'react';
import { SafeAreaView, ScrollView, StyleSheet } from 'react-native';
import { Text, Card } from 'react-native-paper';
import { createStackNavigator } from '@react-navigation/stack';
import { NavigationContainer } from '@react-navigation/native';
import Header from './components/Header';
import SidebarIcon from './components/SidebarIcon';
import Sidebar from './components/Sidebar';
import Home from './components/Home';
import Login from './components/Login/Login';
import SignUp from './components/Login/SignUp';
import EntryLoginPage from './components/Login/EntryLoginPage';
import Navigation from './Navigation/Navigation';
import NavigationStack from './components/NavigationStack';
const Stack = createStackNavigator();
export default function App() {
const [isSidebarOpen, setIsSidebarOpen] = useState(false);
const toggleSidebar = () => {
setIsSidebarOpen(!isSidebarOpen);
};
return (
<NavigationContainer>
<Header />
<SidebarIcon style={styles.container} onPress={toggleSidebar} />
<Sidebar isOpen={isSidebarOpen} onClose={toggleSidebar} />
<NavigationStack />
</NavigationContainer>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
width: '100%',
backgroundColor: '#ecf0f1',
padding: 40,
},
info: {
fontSize: 16,
textAlign: 'center',
marginBottom: 20,
},
container: {
position: 'absolute',
top: 20,
left: 20,
zIndex: 1,
},
});