-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
27 lines (24 loc) · 1.02 KB
/
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 { EDSProvider } from "@equinor/mad-components";
import { ToastEmitter } from "@equinor/mad-toast";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { DoneButtonInputAccessoryView } from "./components/DoneButtonInputAccessoryView";
import { useCachedResources } from "./hooks/useCachedResources";
import { useColorScheme } from "./hooks/useColorScheme";
import { useLockScreenOrientation } from "./hooks/useLockScreenOrientation";
import { Navigation } from "./navigation";
import { getEDSDensity } from "./utils/getEDSDensity";
export default function App() {
const colorScheme = useColorScheme();
const isLoadingComplete = useCachedResources();
useLockScreenOrientation();
if (!isLoadingComplete) return null;
return (
<SafeAreaProvider>
<EDSProvider colorScheme={colorScheme} density={getEDSDensity()}>
<Navigation colorScheme={colorScheme} />
<DoneButtonInputAccessoryView />
<ToastEmitter topOffset={70} />
</EDSProvider>
</SafeAreaProvider>
);
}