-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathApp.tsx
29 lines (25 loc) · 984 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
import * as React from "react";
import { StatusBar, View, Platform } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { Router } from "./components";
import { MainScreen } from "./screens";
// Set this variable to true to test the statusbar offset on
// Android. This creates an additional translation and is a
// good scenario to test and support.
const TEST_ANDROID_STATUSBAR_OFFSET = false;
if (Platform.OS === "android") {
StatusBar.setTranslucent(!TEST_ANDROID_STATUSBAR_OFFSET);
StatusBar.setBackgroundColor("transparent");
}
export default function App() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<View style={{ flex: 1, marginTop: 0, transform: [{ translateY: 0 }] }}>
<Router initialNode={<MainScreen />} />
</View>
</SafeAreaProvider>
</GestureHandlerRootView>
);
}