-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
47 lines (43 loc) · 1.18 KB
/
App.tsx
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
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet} from 'react-native';
import Header from './components/Header';
import AddButton from './components/AddButton';
import TodoList from './components/TodoList';
import Modal from './components/Modal';
import {Provider} from 'react-redux';
import store from './store';
import {SortableButton} from './components/SortableButton';
import {Gate} from './components/Gate';
function App(): JSX.Element {
const [modalVisible, setModalVisible] = useState(false);
return (
<Provider store={store}>
<SafeAreaView style={styles.app}>
<Gate>
<Header title="JUST DO IT" />
<TodoList />
<Modal
modalVisible={modalVisible}
setModalVisible={setModalVisible}
/>
<AddButton
handleClick={() => {
setModalVisible(!modalVisible);
}}
/>
<SortableButton />
</Gate>
</SafeAreaView>
</Provider>
);
}
const styles = StyleSheet.create({
app: {
flex: 1,
position: 'relative',
backgroundColor: '#252422',
width: '100%',
height: '100%',
},
});
export default App;