Reactnative-notesapp/App.tsx

44 lines
1.8 KiB
TypeScript
Raw Normal View History

2023-03-05 21:37:52 +08:00
import "react-native-gesture-handler";
import { NavigationContainer } from "@react-navigation/native";
import { createDrawerNavigator } from "@react-navigation/drawer";
import CustomDrawerContent from "./src/Components/Drawer/DrawerScreenSettings/CustomDrawerContent/CustomDrawerContent";
import DrawerScreenSettings from "./src/Components/Drawer/DrawerScreenSettings/DrawerScreenSettings";
import Home from "./src/Routes/Home/Home";
import UserInfo from "./src/Routes/UserInfo/UserInfo";
2023-04-08 22:39:18 +08:00
import NewNote from "./src/Routes/NewNote/NewNote";
2023-03-05 21:37:52 +08:00
import Login from "./src/Routes/Login/Login";
import Register from "./src/Routes/Register/Register";
2023-04-08 14:18:58 +08:00
import { Provider } from "react-redux";
import Store from "./src/Features/Redux/Store/Store";
import { QueryClient, QueryClientProvider } from "react-query";
2023-04-16 19:34:19 +08:00
import EditNote from "./src/Routes/EditNote/EditNote";
2023-03-05 21:37:52 +08:00
const Drawer = createDrawerNavigator();
2023-04-08 22:39:18 +08:00
const queryClient = new QueryClient();
export default function App() {
return (
2023-04-16 19:34:19 +08:00
<Provider store={Store}>
<QueryClientProvider client={queryClient}>
<NavigationContainer>
<Drawer.Navigator
initialRouteName="Home"
drawerContent={CustomDrawerContent}
screenOptions={DrawerScreenSettings}
>
<Drawer.Screen name="Home" component={Home} />
<Drawer.Screen name="New Note" component={NewNote} />
<Drawer.Screen name="User Info" component={UserInfo} />
<Drawer.Screen name="Login" component={Login} />
<Drawer.Screen name="Register" component={Register} />
<Drawer.Screen name="LogOut" component={Register} />
<Drawer.Screen name="EditNote" component={EditNote} />
</Drawer.Navigator>
</NavigationContainer>
</QueryClientProvider>
</Provider>
);
2023-04-16 19:34:19 +08:00
}