forked from WrathChaos/react-native-typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
36 lines (30 loc) · 829 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
28
29
30
31
32
33
34
35
36
import "react-native-gesture-handler";
import React from "react";
import { StatusBar, useColorScheme, LogBox } from "react-native";
import SplashScreen from "react-native-splash-screen";
/**
* ? Local Imports
*/
import Navigation from "./src/navigation";
import { isAndroid } from "@freakycoder/react-native-helpers";
LogBox.ignoreAllLogs();
const App = () => {
const scheme = useColorScheme();
const isDarkMode = scheme === "dark";
React.useEffect(() => {
StatusBar.setBarStyle(isDarkMode ? "light-content" : "dark-content");
if (isAndroid) {
StatusBar.setBackgroundColor("rgba(0,0,0,0)");
StatusBar.setTranslucent(true);
}
setTimeout(() => {
SplashScreen.hide();
}, 750);
}, [scheme, isDarkMode]);
return (
<>
<Navigation />
</>
);
};
export default App;