forked from Jangbogo-2NT/Jangbogo-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
27 lines (24 loc) · 718 Bytes
/
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
import * as SplashScreen from "expo-splash-screen";
import { useState } from "react";
import { SafeAreaProvider } from "react-native-safe-area-context";
import RootApp from "./src/RootApp";
import { TokenContext } from './src/contexts/TokenContext';
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
async function delay_splash() {
await SplashScreen.preventAutoHideAsync();
await sleep(3000);
await SplashScreen.hideAsync();
}
export default function App() {
const tokenState = useState();
delay_splash();
return (
<SafeAreaProvider>
<TokenContext.Provider value={tokenState}>
<RootApp />
</TokenContext.Provider>
</SafeAreaProvider>
);
}