-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
43 lines (38 loc) · 1.47 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
import React, { useState, useEffect } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { QueryClient, QueryClientProvider } from "react-query";
import LoginScreen from "./components/loginScreen";
import MainDashboard from "./components/MainDashboard";
import StudexDashboard from "./components/StudexDashboard";
import SearchStudex from "./components/SearchStudex";
import Birthday from "./components/Birthday";
import CustomSplash from "./components/CustomSplash";
const Stack = createStackNavigator();
const queryClient = new QueryClient();
const App = () => {
const [appReady, setAppReady] = useState(false);
useEffect(() => {
setTimeout(() => {
setAppReady(true);
}, 3000);
}, []);
return (
<QueryClientProvider client={queryClient}>
{appReady ? (
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="MainDashboard" component={MainDashboard} />
<Stack.Screen name="StudexDashboard" component={StudexDashboard} />
<Stack.Screen name="SearchStudex" component={SearchStudex} />
<Stack.Screen name="Birthday" component={Birthday} />
</Stack.Navigator>
</NavigationContainer>
) : (
<CustomSplash />
)}
</QueryClientProvider>
);
};
export default App;