-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTest.js
216 lines (197 loc) · 5.61 KB
/
Test.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
import React , { Component } from 'react' ;
import {YellowBox, Button, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { createStackNavigator, createAppContainer } from 'react-navigation';
import Icon from 'react-native-vector-icons/FontAwesome';
//import FoodList1 from './FoodList1';
import FoodList from './FoodList';
import Taxi from './Taxi';
//import Login from './Login';
import RegisterAsChef from './RegisterAsChef';
import FoodItems from './FoodItems';
export class Test extends Component {
static navigationOptions = {
title: "Misiki",
headerRight: (
<Button
onPress={() => alert('Currently unavailable feature')}
title='Login'
/*icon={
<Icon
name="arrow-right"
size={15}
color="white"
/>}*/
/>
),
headerStyle: {
backgroundColor: "#f44336"
},
headerTintColor: "#fff",
headerTitleStyle: {
fontWeight: "bold",
fontSize: 25
}
};
render () {
return (
<View style={{flex: 1}}>
<View style={styles.container1}>
<TouchableOpacity style = {styles.button} onPress={() => this.props.navigation.navigate(`FoodList`)}>
<View
style={styles.buttonText1}>
<Icon
name='cutlery'
size={20}
color='white'
style={{height:25,width:25}}/>
<View>
<Text style={styles.buttonText1}>Food Order</Text>
<Text style={styles.buttonText2}>Misiki Food Delivery</Text>
</View>
</View>
</TouchableOpacity>
</View>
<View style={styles.container2}>
<TouchableOpacity style = {styles.button2} onPress={() => this.props.navigation.navigate(`Taxi`)}>
<View
style={styles.buttonText1}>
<Icon
name='taxi'
size={20}
color='white'
style={{height:25,width:25}}/>
<View>
<Text style={styles.buttonText1}>Book a Taxi</Text>
<Text style={styles.buttonText2}>Misiki Taxi</Text>
</View>
</View>
</TouchableOpacity>
</View>
<View style={styles.container3}>
<TouchableOpacity style = {styles.button3} onPress={() => this.props.navigation.navigate(`RegisterAsChef`)}>
<View
style={styles.buttonText3}>
<Icon
name='bell'
size={20}
color='white'
style={{height:25,width:25}}/>
<Text style={styles.buttonText3}>Get started as Chef (in 30 seconds)</Text>
</View>
</TouchableOpacity>
</View>
<View style={styles.container4}>
<TouchableOpacity style = {styles.button4} >
<View style={styles.buttonText4}>
<Text style={styles.buttonText4}>Note: Delivery only to Sunabeda</Text>
</View>
</TouchableOpacity>
</View>
</View>
)
}
}
const AppStackNavigator = createStackNavigator({
Test: { screen: Test },
RegisterAsChef: {screen: RegisterAsChef},
//Login: {screen: Login},
FoodList : { screen: FoodList },
//FoodList1 : { screen: FoodList1 },
Taxi: { screen: Taxi},
FoodItems : { screen: FoodItems },
});
const App = createAppContainer(AppStackNavigator);
export default App;
/*YellowBox.ignoreWarnings([
"Warning: isMounted(...) is deprecated",
"Module RCTImageLoader"
]);*/
const styles = StyleSheet.create({
button: {
backgroundColor: '#2196f3',
borderRadius: 12,
overflow: 'hidden',
padding: 8,
textAlign:'center',
},
button2: {
backgroundColor: '#f44336',
borderRadius: 12,
overflow: 'hidden',
padding: 8,
textAlign:'center',
},
button3: {
backgroundColor: 'green',
borderRadius: 12,
overflow: 'hidden',
padding: 8,
textAlign:'right',
},
button4: {
width: '100%',
backgroundColor: '#fff55e',
//borderRadius: 12,
overflow: 'hidden',
padding: 8,
//textAlign:'right',
},
buttonText1:{
color: 'white',
fontSize: 27,
padding: 8,
textAlign:'center'
},
buttonText2: {
color: 'white',
fontSize: 17,
overflow: 'hidden',
textAlign:'center',
},
buttonText3: {
flexDirection: 'row',
alignItems: 'center',
color: 'white',
fontSize: 20,
overflow: 'hidden',
textAlign:'right',
padding: 8
},
buttonText4: {
color: 'black',
fontSize: 19,
fontWeight: '500',
overflow: 'hidden',
textAlign:'center',
padding: 5
},
container1: {
aspectRatio: 1,
alignItems: 'flex-start',
position: 'absolute',
top: '4%',
left: '3%'
},
container2: {
aspectRatio: 1,
alignItems: 'flex-start',
position: 'absolute',
top: '4%',
right: '3%'
},
container3: {
aspectRatio: 1,
alignItems: 'flex-start',
position: 'absolute',
top: '26%',
left: '3%'
},
container4: {
aspectRatio: 1,
width: '100%',
alignItems: 'flex-start',
position: 'relative',
top: '46%',
left: '0%'
},
});