From 18474b59861e6cac5566c5e1202f4b59fc2357a1 Mon Sep 17 00:00:00 2001
From: Shravya Ramesh <shravs1208@gmail.com>
Date: Fri, 5 Mar 2021 19:59:23 -0800
Subject: done

---
 src/components/profile/UniversityIcon.tsx | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

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

diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index 95aef8b9..097b01dd 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -1,11 +1,12 @@
 import React from 'react';
-import {StyleSheet, ViewProps} from 'react-native';
+import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
 import {Image, Text, View} from 'react-native-animatable';
 import {getUniversityClass, normalize} from '../../utils';
 
 export interface UniversityIconProps extends ViewProps {
   university: string;
-  university_class: number;
+  university_class?: number;
+  imageStyle?: StyleProp<ImageStyle>;
 }
 
 /**
@@ -13,6 +14,7 @@ export interface UniversityIconProps extends ViewProps {
  */
 const UniversityIcon: React.FC<UniversityIconProps> = ({
   style,
+  imageStyle,
   university,
   university_class,
 }) => {
@@ -28,10 +30,12 @@ const UniversityIcon: React.FC<UniversityIconProps> = ({
 
   return (
     <View style={[styles.container, style]}>
-      <Image source={universityIcon} style={styles.icon} />
-      <Text style={styles.univClass}>
-        {getUniversityClass(university_class)}
-      </Text>
+      <Image source={universityIcon} style={[styles.icon, imageStyle]} />
+      {university_class && (
+        <Text style={styles.univClass}>
+          {getUniversityClass(university_class)}
+        </Text>
+      )}
     </View>
   );
 };
-- 
cgit v1.2.3-70-g09d2

