From 38661e00281363b0f4ad32f0b29d739e1ca09164 Mon Sep 17 00:00:00 2001
From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com>
Date: Wed, 30 Dec 2020 11:36:44 -0800
Subject: [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 ?
---
 src/components/profile/UniversityIcon.tsx | 58 +++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 src/components/profile/UniversityIcon.tsx

(limited to 'src/components/profile/UniversityIcon.tsx')

diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
new file mode 100644
index 00000000..15c23715
--- /dev/null
+++ b/src/components/profile/UniversityIcon.tsx
@@ -0,0 +1,58 @@
+import React from 'react';
+import {StyleSheet, ViewProps} from 'react-native';
+import {Image, Text, View} from 'react-native-animatable';
+import {getUniversityClass} from '../../utils';
+
+export interface UniversityIconProps extends ViewProps {
+  university: string;
+  university_class: number;
+}
+
+/**
+ * Component to display university icon and class
+ */
+const UniversityIcon: React.FC<UniversityIconProps> = ({
+  style,
+  university,
+  university_class,
+}) => {
+  var universityIcon;
+  switch (university) {
+    case 'brown':
+      universityIcon = require('../../assets/universities/brown.png');
+      break;
+    default:
+      universityIcon = require('../../assets/universities/brown.png');
+      break;
+  }
+
+  return (
+    <View style={[styles.container, style]}>
+      <Image source={universityIcon} style={styles.icon} />
+      <Text style={styles.univClass}>
+        {getUniversityClass(university_class)}
+      </Text>
+    </View>
+  );
+};
+
+const styles = StyleSheet.create({
+  container: {
+    flex: 1,
+    flexDirection: 'column',
+    flexWrap: 'wrap',
+    justifyContent: 'center',
+    marginBottom: '10%',
+  },
+  univClass: {
+    fontSize: 15,
+    fontWeight: '500',
+  },
+  icon: {
+    alignSelf: 'center',
+    width: 20,
+    height: 22.5,
+  },
+});
+
+export default UniversityIcon;
-- 
cgit v1.2.3-70-g09d2

