-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
106 lines (91 loc) · 2.51 KB
/
App.js
File metadata and controls
106 lines (91 loc) · 2.51 KB
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 * as React from 'react';
import { View, Text, StyleSheet, ImageBackground } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import Home from './src/components/Home';
import CalculatorPace from './src/components/CalculatorPace';
import CalculatorSpeed from './src/components/CalculatorSpeed';
import Footer from './src/components/Footer';
function SplashScreen({navigation}) {
setTimeout(() => {
navigation.replace('Home')
}, 3000);
return (
<ImageBackground
style={{flex: 1}, {width: '100%'}, {height: '100%'}, {paddingTop: '200%'}}
source={require('./assets/splash.jpg')}>
</ImageBackground>
);
}
const Stack = createStackNavigator();
function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName={SplashScreen}>
<Stack.Screen
name='SplashScreen'
component={SplashScreen}
options={{
title: '',
headerStyle: {
backgroundColor: '#a7e0d7',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
headerBackAccessibilityLabel: 'none',
}}
/>
<Stack.Screen
name='Home'
component={Home}
options={{
title: 'Calculadora de Corrida',
headerStyle: {
backgroundColor: '#0c1f38',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen
name='CalculatorSpeed'
component={CalculatorSpeed}
options={{
title: 'Velocidade',
headerStyle: {
backgroundColor: '#0c1f38',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen
name='CalculatorPace'
component={CalculatorPace}
options={{
title: 'Pace',
headerStyle: {
backgroundColor: '#0c1f38',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
},
});