-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
33 lines (31 loc) · 1.25 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
import React, { useState } from 'react';
import {createDrawerNavigator} from '@react-navigation/drawer';
import {NavigationContainer, Theme} from '@react-navigation/native';
import { createNativeStackNavigator} from '@react-navigation/native-stack';
import {StatusBar} from 'expo-status-bar';
import { PaperProvider } from 'react-native-paper';
import { Appbar } from 'react-native-paper';
import { Provider } from 'react-redux'
import Editor from './components/Editor';
import NotesList from './components/NotesList';
export default function App() {
const Drawer = createDrawerNavigator();
const [notes, setNotes] = useState<Array<Note>>([])
const Stack = createNativeStackNavigator();
return (
<PaperProvider>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="NotesList" options={{ headerShown: false }}>
{props => <NotesList {...props} notes={notes} />}
</Stack.Screen>
<Stack.Screen name="Editor" options={{ headerShown: false }}>
{props => <Editor {...props} setNotes={setNotes} notes={notes}/>}
</Stack.Screen>
</Stack.Navigator>
{/* <Editor setNotes={setNotes}/> */}
</NavigationContainer>
<StatusBar style='dark'/>
</PaperProvider>
);
}