From af7c3d686149f32128d251c6d2fab3d82fb89ac4 Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 21 Apr 2021 16:42:34 -0700
Subject: Badge view changes

---
 src/components/profile/UniversityIcon.tsx | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

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

diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index 4cb1abe6..f1451f83 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -8,6 +8,7 @@ export interface UniversityIconProps extends ViewProps {
   university: UniversityType;
   university_class?: number;
   imageStyle?: StyleProp<ImageStyle>;
+  needsShadow?: boolean;
 }
 
 /**
@@ -18,13 +19,16 @@ const UniversityIcon: React.FC<UniversityIconProps> = ({
   university,
   university_class,
   imageStyle,
+  needsShadow = false,
 }) => {
   return (
     <View style={[styles.container, style]}>
-      <Image
-        source={getUniversityBadge(university, 'Crest')}
-        style={[styles.icon, imageStyle]}
-      />
+      <View style={needsShadow && styles.shadowStyle}>
+        <Image
+          source={getUniversityBadge(university, 'Crest')}
+          style={[styles.icon, imageStyle]}
+        />
+      </View>
       {university_class && (
         <Text style={styles.univClass}>
           {getUniversityClass(university_class)}
@@ -50,6 +54,17 @@ const styles = StyleSheet.create({
     width: normalize(17),
     height: normalize(19),
   },
+  shadowStyle: {
+    padding: 5,
+    borderRadius: 30,
+    shadowOffset: {
+      width: 1,
+      height: 1,
+    },
+    shadowOpacity: 1,
+    shadowRadius: 3,
+    backgroundColor: 'white',
+  },
 });
 
 export default UniversityIcon;
-- 
cgit v1.2.3-70-g09d2


From c740dd5b018e427c23fd41b8dc255df671eabc61 Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Thu, 22 Apr 2021 15:55:49 -0700
Subject: PR Changes

---
 src/components/common/BadgeDetailView.tsx |  2 +-
 src/components/profile/FriendsCount.tsx   |  2 +-
 src/components/profile/UniversityIcon.tsx |  5 +++--
 src/screens/badge/BadgeSelection.tsx      | 10 +++++++---
 4 files changed, 12 insertions(+), 7 deletions(-)

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

diff --git a/src/components/common/BadgeDetailView.tsx b/src/components/common/BadgeDetailView.tsx
index f4271099..32cc7aa4 100644
--- a/src/components/common/BadgeDetailView.tsx
+++ b/src/components/common/BadgeDetailView.tsx
@@ -205,7 +205,7 @@ const BadgeDetailView: React.FC<BadgeDetailModalProps> = ({
 
   return (
     <Modal
-      animationType="slide"
+      animationType="fade"
       transparent
       visible={true}
       presentationStyle="overFullScreen">
diff --git a/src/components/profile/FriendsCount.tsx b/src/components/profile/FriendsCount.tsx
index 18cd1400..8252266e 100644
--- a/src/components/profile/FriendsCount.tsx
+++ b/src/components/profile/FriendsCount.tsx
@@ -62,7 +62,7 @@ const styles = StyleSheet.create({
     fontSize: normalize(14),
   },
   label: {
-    marginTop: 10,
+    marginTop: 4,
     fontWeight: '500',
     fontSize: normalize(14),
   },
diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index f1451f83..cfe1366d 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -51,8 +51,8 @@ const styles = StyleSheet.create({
     fontWeight: '500',
   },
   icon: {
-    width: normalize(17),
-    height: normalize(19),
+    width: normalize(12),
+    height: normalize(13),
   },
   shadowStyle: {
     padding: 5,
@@ -63,6 +63,7 @@ const styles = StyleSheet.create({
     },
     shadowOpacity: 1,
     shadowRadius: 3,
+    shadowColor: 'rgba(0, 0, 0, 0.3)',
     backgroundColor: 'white',
   },
 });
diff --git a/src/screens/badge/BadgeSelection.tsx b/src/screens/badge/BadgeSelection.tsx
index 0284498d..38a2b01c 100644
--- a/src/screens/badge/BadgeSelection.tsx
+++ b/src/screens/badge/BadgeSelection.tsx
@@ -67,9 +67,13 @@ const BadgeSelection: React.FC<BadgeSelectionProps> = ({route}) => {
         onPress={async () => {
           if (editing) {
             await updateBadgesService(selectedBadges, university);
-            navigation.navigate('UpdateSPPicture', {
-              editing: true,
-            });
+            if (navigation.canGoBack()) {
+              navigation.goBack();
+            } else {
+              navigation.navigate('UpdateSPPicture', {
+                editing: true,
+              });
+            }
           } else {
             if (selectedBadges.length !== 0) {
               const success = await addBadgesService(
-- 
cgit v1.2.3-70-g09d2

