-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
27 lines (25 loc) · 817 Bytes
/
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
import "react-native-gesture-handler";
import React from "react";
import { useState } from "react";
import SplashScreen from "./screens/SplashScreen";
import { NavigationContainer } from "@react-navigation/native";
import { Provider, useSelector } from "react-redux";
import { store } from "./store";
import RootStack from "./stack/RootStack";
import { StatusBar } from "expo-status-bar";
import { AuthContextProvider } from "./context/AuthContext";
export default function App() {
const [isLoading, setIsLoading] = useState(true);
if (isLoading) {
return <SplashScreen onFinish={setIsLoading} />;
}
return (
<AuthContextProvider>
<Provider store={store}>
<NavigationContainer>
<RootStack />
</NavigationContainer>
</Provider>
</AuthContextProvider>
);
}