-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
173 lines (162 loc) · 5.26 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
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
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { View, Text, Image, StyleSheet, Pressable } from 'react-native';
import { useNavigation } from '@react-navigation/native';
import Landing from './pages/Landing';
import Login from './pages/Login';
import Signup from './pages/Signup';
import Home from './pages/Home';
import SOS from './pages/SOS';
import Jobs from './pages/Jobs';
import Community from './pages/Community/Community';
import CommunityPosts from './pages/Community/CommunityPost';
import ViewPost from './pages/Community/ViewPost';
import Therapy from './pages/Therapy';
import LegalReforms from './pages/LegalReforms';
import PersonalGuide from './pages/PersonalGuide';
import Skill from './pages/Skill';
import FinancialGuidance from './pages/FinancialGuidance';
const Stack = createStackNavigator();
const Profile = () => {
const navigation = useNavigation();
return (
<View style={{ marginRight: 10 }}>
<Pressable onPress={() => navigation.navigate("SOS" as never)}>
<Image source={require('./assets/images/sos.png')} style={styles.image} />
</Pressable>
</View>
);
};
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator
// initialRouteName="Get Started"
// initialRouteName="FinancialGuidance"
>
<Stack.Screen name="Get started" component={Landing} options={{
title: 'Welcome',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
}} />
<Stack.Screen name="Login" component={Login} options={{
title: 'Login',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
}
}} />
<Stack.Screen name="Signup" component={Signup} options={{
title: 'Signup',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
}
}} />
<Stack.Screen name="Home" component={Home} options={{
title: 'Home',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="SOS" component={SOS} options={{
title: 'SOS',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="Jobs" component={Jobs} options={{
title: 'Jobs',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="Community" component={Community} options={{
title: 'Community',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="CommunityPosts" component={CommunityPosts} options={{
title: 'Community Post',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen
name="ViewPost"
options={{
title: 'View Post',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}}
>
{(props: any) => <ViewPost {...props} />}
</Stack.Screen>
<Stack.Screen name="Therapy" component={Therapy} options={{
title: 'Therapy',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="LegalReforms" component={LegalReforms} options={{
title: 'Legal Reforms',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="PersonalGuide" component={PersonalGuide} options={{
title: 'Personal Guide',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="Skill" component={Skill} options={{
title: 'Skill',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
<Stack.Screen name="FinancialGuidance" component={FinancialGuidance} options={{
title: 'Financial Guide',
headerTintColor: '#590D22',
headerStyle: {
backgroundColor: '#FFB3C1'
},
headerRight: () => <Profile />,
}} />
</Stack.Navigator>
<StatusBar style="auto" />
</NavigationContainer>
);
}
const styles = StyleSheet.create({
image: {
height: 45,
width: 45,
}
})