-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
106 lines (94 loc) · 3.02 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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import 'react-native-gesture-handler';
import React from "react";
import { NativeBaseProvider, extendTheme } from "native-base";
import { useFonts } from 'expo-font';
import { Inter_100Thin, Inter_200ExtraLight, Inter_300Light, Inter_400Regular, Inter_500Medium, Inter_600SemiBold, Inter_800ExtraBold } from '@expo-google-fonts/inter';
import {NavigationContainer} from '@react-navigation/native';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { LinearGradient } from 'expo-linear-gradient';
import Registrarse from "./src/components/auth/register";
import Login from "./src/components/auth/login";
import Home from "./src/components/home/home";
import Perfil from './src/components/usuario/perfil';
import Patologia from './src/components/patologias/patologia';
const config = {
dependencies: {
"linear-gradient": require("expo-linear-gradient").LinearGradient,
},
};
const Drawer = createDrawerNavigator();
export const theme = extendTheme({
colors: {
background: 'white',
},
fontConfig: {
Inter: {
100: {
normal: Inter_100Thin,
},
200: {
normal: Inter_200ExtraLight,
},
300: {
normal: Inter_300Light,
},
400: {
normal: Inter_400Regular,
},
600: {
normal: Inter_600SemiBold,
},
800: {
normal: Inter_800ExtraBold,
},
},
},
fonts: {
heading: "Inter_600SemiBold",
body: "Inter_400Regular",
mono: "Inter_100Thin",
}})
export default function App () {
const [loaded] = useFonts({
Inter_200ExtraLight,
Inter_400Regular,
Inter_500Medium,
Inter_600SemiBold,
Inter_800ExtraBold
});
if (!loaded) {
return null;
}
return (
<NativeBaseProvider config={config} theme={theme}>
<NavigationContainer >
<Drawer.Navigator initialRouteName="Login" drawerContent={ (props) => <Perfil {...props}/>}>
<Drawer.Screen name="Login" component={Login} options={{ headerShown: false }}/>
<Drawer.Screen name="Register" component={Registrarse} options={{ headerShown: false }}/>
<Drawer.Screen name="Home" component={Home} options={{
headerTintColor:"white",
headerBackground:
() =>
<LinearGradient
colors={['#FEAC5E', '#C779D0']}
start={[0, 0.5]}
end={[1, 0.5]}
style={{ flex: 1 }}
/>
}}/>
<Drawer.Screen name="Patologia" component={Patologia} options={{
headerTintColor:"white",
headerBackground:
() =>
<LinearGradient
colors={['#FEAC5E', '#C779D0']}
start={[0, 0.5]}
end={[1, 0.5]}
style={{ flex: 1 }}
/>
}}/>
</Drawer.Navigator>
</NavigationContainer>
</NativeBaseProvider>
);
};