-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFriends.js
45 lines (40 loc) · 1.02 KB
/
Friends.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
import React from 'react';
import { StyleSheet, Text, ScrollView,Button,FlatList,View} from 'react-native';
export default class Friends extends React.Component {
render() {
return (
<ScrollView>
<Text> Add friends here!</Text>
{
this.props.screenProps.possibleFriends.map((disease, index) => (
<View style={styles.container}>
<Button
key={ disease}
title={""+disease}
type= "solid"
onPress={() =>
this.props.screenProps.addFriend(index)
}
/>
</View>
)
)
}
<Button
title="Back to home"
onPress={() =>
this.props.navigation.navigate('Home')
}
/>
</ScrollView>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
alignItems: 'center',
justifyContent: 'space-between',
},
});