-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
45 lines (41 loc) · 1.27 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Libraries
import React, { Suspense } from "react";
import { initialWindowMetrics } from "react-native-safe-area-context";
// Framework Components
import { NativeRouter, Route, Switch, BackButton } from "react-router-native";
import { View, Text, Dimensions } from "react-native";
import { ApplicationProvider, IconRegistry } from "@ui-kitten/components";
import { StatusBar } from "expo-status-bar";
import { EvaIconsPack } from "@ui-kitten/eva-icons";
// Custom Components
// Styling
import * as eva from "@eva-design/eva";
import { default as mapping } from "./mapping.json";
import ROUTES from "./src/routes/index.js";
export const App = () => (
<NativeRouter>
<IconRegistry icons={EvaIconsPack} />
<ApplicationProvider {...eva} theme={eva.light} customMapping={mapping}>
<View
style={{
height: initialWindowMetrics.insets.top,
}}
/>
<Switch>
{ROUTES.map((route, key) => {
return (
<Route
key={key}
exact
path={route.path}
component={(props) => <route.component {...props} />}
/>
);
})}
</Switch>
</ApplicationProvider>
<StatusBar style="auto" />
<BackButton />
</NativeRouter>
);
export default App;