-
Notifications
You must be signed in to change notification settings - Fork 0
/
Exo1.tsx
85 lines (75 loc) · 2.31 KB
/
Exo1.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { FC } from 'react';
import { Text, View } from 'react-native';
import { PrimaryButton, SafeFullScreenView } from '../../src/components';
import { commonStyles } from '../../src/ui';
// 🐨 Initialize the navigator for the native stack here
export const Exo1 = () => {
// 💥 Delete this code below when you are done with the above instructions
return (
// 🐨 Return the Navigator and define the Screens here
<View>
<Text>Exo 1</Text>
</View>
);
};
// 🐨 Use these components for the screens
// add the correct methods for the buttons to navigate
const HomeScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center}>
<PrimaryButton onPress={undefined}>Cart</PrimaryButton>
<PrimaryButton onPress={undefined}>Categories</PrimaryButton>
</View>
</SafeFullScreenView>
);
};
const CategoriesScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center}>
<PrimaryButton onPress={undefined}>Category</PrimaryButton>
<PrimaryButton onPress={undefined}>Back 2 screens</PrimaryButton>
<PrimaryButton onPress={undefined}>Back</PrimaryButton>
</View>
</SafeFullScreenView>
);
};
const CartScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center}>
<PrimaryButton onPress={undefined}>Home</PrimaryButton>
<PrimaryButton onPress={undefined}>Categories</PrimaryButton>
<PrimaryButton onPress={undefined}>Back</PrimaryButton>
</View>
</SafeFullScreenView>
);
};
const CategoryScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center}>
<PrimaryButton onPress={undefined}>Restaurant</PrimaryButton>
<PrimaryButton onPress={undefined}>Back to initial route</PrimaryButton>
<PrimaryButton onPress={undefined}>Back</PrimaryButton>
</View>
</SafeFullScreenView>
);
};
const RestaurantScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center}>
<PrimaryButton onPress={undefined}>Food Detail</PrimaryButton>
</View>
</SafeFullScreenView>
);
};
const FoodDetailScreen: FC = () => {
return (
<SafeFullScreenView>
<View style={commonStyles.center} />
</SafeFullScreenView>
);
};