aboutsummaryrefslogtreecommitdiff
path: root/src/components/profile/Friends.tsx
diff options
context:
space:
mode:
authorAshm Walia <40498934+ashmgarv@users.noreply.github.com>2020-12-30 11:36:44 -0800
committerGitHub <noreply@github.com>2020-12-30 14:36:44 -0500
commit38661e00281363b0f4ad32f0b29d739e1ca09164 (patch)
tree316cd837b6cc6ae24783f1d93d6c9ee7fb898f68 /src/components/profile/Friends.tsx
parentbd2f89805d0bb1c2f1d08fe8d91099aa4f109d35 (diff)
[TMA - 457]Change followers to friends (#149)
* One commit to replace followers with friends * Move block unblock to drawer and some cosmetic changes * Options to edit own profile when viewing * Changes for University Class * Small fix * Made ProfileOnboarding a scroll view and other small changes * Small fix * Small fix thanks to ivan and tanmay * Add ?
Diffstat (limited to 'src/components/profile/Friends.tsx')
-rw-r--r--src/components/profile/Friends.tsx65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx
new file mode 100644
index 00000000..23ce28fe
--- /dev/null
+++ b/src/components/profile/Friends.tsx
@@ -0,0 +1,65 @@
+import React from 'react';
+import {View, StyleSheet, Text} from 'react-native';
+import {ProfilePreviewType, ScreenType} from '../../types';
+import {ProfilePreview} from '..';
+import {useNavigation} from '@react-navigation/native';
+import {Button} from 'react-native-elements';
+
+interface FriendsProps {
+ result: Array<ProfilePreviewType>;
+ screenType: ScreenType;
+}
+
+const Friends: React.FC<FriendsProps> = ({result, screenType}) => {
+ const navigation = useNavigation();
+ return (
+ <>
+ <View style={styles.header}>
+ <Button
+ title="X"
+ buttonStyle={styles.button}
+ titleStyle={styles.buttonText}
+ onPress={() => {
+ navigation.pop();
+ }}
+ />
+ <Text style={styles.title}>Friends</Text>
+ </View>
+ {result.map((profilePreview) => (
+ <ProfilePreview
+ style={styles.friend}
+ key={profilePreview.id}
+ {...{profilePreview}}
+ previewType={'Friend'}
+ screenType={screenType}
+ />
+ ))}
+ </>
+ );
+};
+
+const styles = StyleSheet.create({
+ header: {flexDirection: 'row'},
+ friend: {
+ marginVertical: 10,
+ },
+ title: {
+ position: 'relative',
+ fontSize: 17,
+ fontWeight: 'bold',
+ paddingBottom: 10,
+ paddingTop: 10,
+ flexGrow: 1,
+ paddingLeft: '26%',
+ },
+ button: {
+ backgroundColor: 'transparent',
+ },
+ buttonText: {
+ color: 'black',
+ fontSize: 18,
+ fontWeight: '400',
+ },
+});
+
+export default Friends;