-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
71 lines (66 loc) · 1.96 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import React, { useEffect } from "react";
import { NativeBaseProvider, extendTheme, theme as nbTheme } from "native-base";
import Config from "./nativebase.config";
import { Platform } from "react-native";
import {
Button,
IconButton,
Divider,
Input,
Radio,
Pressable,
TextArea,
} from "./themes";
import { NavigationContainer } from "@react-navigation/native";
import { createDrawerNavigator } from "@react-navigation/drawer";
import SignUp from "./screens/SignUp";
import SignIn from "./screens/SignIn";
import OtpVerification from "./screens/OtpVerification";
import ProductDetails from "./screens/ProductDetails";
import Splash from "./screens/Splash";
export default ({ children }: { children?: React.ReactNode }) => {
const customTheme = extendTheme({
config: {
initialColorMode: "light",
},
colors: {
primary: nbTheme.colors.violet,
customGray: "#2F3948",
secondary: nbTheme.colors.coolGray,
},
sizes: {
container: "1016px",
},
components: {
Button,
Radio,
Divider,
Input,
TextArea,
},
});
// Move this to index.html later
useEffect(() => {
if (Platform.OS === "web") {
document.body.style.overflow = "hidden";
document.body.style.height = "100%";
}
}, []);
const Drawer = createDrawerNavigator();
return (
<NativeBaseProvider theme={customTheme} config={Config}>
<NavigationContainer>
<Drawer.Navigator
screenOptions={{ headerShown: true }}
initialRouteName="Splash"
>
<Drawer.Screen name={"Splash"} component={Splash} />
<Drawer.Screen name={"SignUp"} component={SignUp} />
<Drawer.Screen name={"SignIn"} component={SignIn} />
<Drawer.Screen name={"OtpVerification"} component={OtpVerification} />
<Drawer.Screen name={"ProductDetails"} component={ProductDetails} />
</Drawer.Navigator>
</NavigationContainer>
</NativeBaseProvider>
);
};