-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
157 lines (147 loc) · 4.27 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
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
import { StyleSheet, Pressable, Text, View, Image, TouchableOpacity, FlatList, SafeAreaView, Button, TouchableWithoutFeedback } from "react-native";
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import DonorFlow from './DonorFlow';
import NonprofitFlow from './NonprofitFlow';
import FundraiserStack from './Tabs/FundraiserStack';
import {COLORS} from './Constants';
import { NavigationContainer } from '@react-navigation/native';
import { useNavigation } from '@react-navigation/native';
import { LogBox } from 'react-native';
// The below line disables all logs from being displayed on the app.
// Useful for screen recording.
LogBox.ignoreAllLogs();
const LOAD_TIME = 100;
const INTERVAL = 25;
const Stack = createNativeStackNavigator();
function SignIn({navigation}) {
return (
<View style = {styles.container}>
<Image style = {styles.logoimg} source = {require('./assets/Home/logofull.png')}>
</Image>
<Text style = {styles.whitetext}> Welcome to Match.Me!</Text>
<Text style = {styles.subtext}> Donor-matching platform that allows you to explore nonprofits and multiply your impact </Text>
<Pressable onPress={()=>navigation.navigate(ChooseFlow)}
style={({ pressed }) => [
{
top: '6%',
left: '15%',
width: 300,
alignItems: 'center',
justifyContent: 'center',
paddingVertical: 15,
borderRadius: 100,
elevation: 3,
backgroundColor: pressed
? 'gray'
: COLORS.BLACK
},
styles.wrapperCustom
]}
>
<Text style={styles.buttontext}> Sign In </Text>
</Pressable>
</View>
);
}
function ChooseFlow({navigation}) {
return(
<View style = {styles.container}>
<Image style= { {top: '5%', left: '5%'}} source = {require('./assets/Home/logowhite.png')}>
</Image>
<Text style = {styles.whitetext}> I am a </Text>
<Pressable onPress={()=>navigation.navigate(DonorFlow)}
style={({ pressed }) => [
{
top: '7%',
left: '15%',
width: 300,
alignItems: 'center',
justifyContent: 'center',
paddingVertical: 15,
borderRadius: 100,
elevation: 3,
backgroundColor: pressed
? 'gray'
: COLORS.WHITE
},
styles.wrapperCustom
]}
>
<Text style={styles.buttontextexplore}> Donor </Text>
</Pressable>
<Pressable onPress={()=>navigation.navigate(NonprofitFlow)}
style={({ pressed }) => [
{
top: '11%',
left: '15%',
width: 300,
alignItems: 'center',
justifyContent: 'center',
paddingVertical: 15,
borderRadius: 100,
elevation: 3,
backgroundColor: pressed
? 'gray'
: COLORS.WHITE
},
styles.wrapperCustom
]}
>
<Text style={styles.buttontextexplore}> Nonprofit </Text>
</Pressable>
</View>
);
}
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Sign In" screenOptions= {{
headerShown: false,
}}>
<Stack.Screen name="SignIn" component={SignIn}
/>
<Stack.Screen name="ChooseFlow" component={ChooseFlow}
/>
<Stack.Screen name="DonorFlow" component={DonorFlow}
/>
<Stack.Screen name="NonprofitFlow" component={NonprofitFlow}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: COLORS.GREEN,
},
logoimg: {
top: '17%',
left: '12%',
},
buttontext: {
color: COLORS.WHITE,
fontWeight: 'bold',
fontSize: 20,
},
buttontextexplore: {
color: COLORS.GREEN,
fontWeight: 'bold',
fontSize: 20,
},
whitetext: {
textAlign: 'center',
color: COLORS.WHITE,
fontSize: 40,
fontWeight: 'bold',
marginTop: 140,
},
subtext: {
textAlign: 'center',
marginTop: 20,
marginLeft: 45,
marginRight: 45,
color: COLORS.WHITE,
fontSize: 20,
},
});