From 2222579eea6b2de8b093c9201100335067bd51eb Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 24 Mar 2021 11:03:19 -0700
Subject: Bunch of TODOs for Cornell Changes

---
 src/components/profile/ProfileHeader.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index e5bd9d93..87eeb507 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -60,7 +60,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
           <View style={styles.friendsAndUniversity}>
             <FriendsCount screenType={screenType} userXId={userXId} />
             <UniversityIcon
-              university="brown"
+              university="brown" //TODO: Change
               university_class={university_class}
             />
           </View>
-- 
cgit v1.2.3-70-g09d2


From 592cb776068b2f1daf90755e04b33cdeba2bb947 Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 24 Mar 2021 11:10:08 -0700
Subject: Bunch of Todos + icon updates

---
 src/assets/universities/cornell-clicked.png             | Bin 0 -> 12362 bytes
 src/assets/universities/cornell-search.png              | Bin 0 -> 12171 bytes
 src/components/profile/ProfileHeader.tsx                |   2 +-
 src/components/search/SearchResultCell.tsx              |   2 +-
 src/components/suggestedPeople/BadgesDropdown.tsx       |   4 ++--
 .../suggestedPeople/UniversityIconClicked.tsx           |   3 +++
 src/constants/badges.ts                                 |   2 +-
 src/constants/constants.ts                              |   2 +-
 src/screens/search/SearchScreen.tsx                     |   2 +-
 .../SuggestedPeopleUploadPictureScreen.tsx              |   2 +-
 src/services/ExploreService.ts                          |   2 +-
 src/types/types.ts                                      |   2 +-
 12 files changed, 13 insertions(+), 10 deletions(-)
 create mode 100644 src/assets/universities/cornell-clicked.png
 create mode 100644 src/assets/universities/cornell-search.png

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

diff --git a/src/assets/universities/cornell-clicked.png b/src/assets/universities/cornell-clicked.png
new file mode 100644
index 00000000..d6450b29
Binary files /dev/null and b/src/assets/universities/cornell-clicked.png differ
diff --git a/src/assets/universities/cornell-search.png b/src/assets/universities/cornell-search.png
new file mode 100644
index 00000000..ce41e7bc
Binary files /dev/null and b/src/assets/universities/cornell-search.png differ
diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 87eeb507..9d9a5cbd 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -60,7 +60,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
           <View style={styles.friendsAndUniversity}>
             <FriendsCount screenType={screenType} userXId={userXId} />
             <UniversityIcon
-              university="brown" //TODO: Change
+              university="brown" //TODO: Update for Cornell
               university_class={university_class}
             />
           </View>
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx
index 3379d789..4484bcd3 100644
--- a/src/components/search/SearchResultCell.tsx
+++ b/src/components/search/SearchResultCell.tsx
@@ -153,7 +153,7 @@ const SearchResultsCell: React.FC<SearchResults> = ({
         <View style={[styles.imageContainer, styles.categoryBackground]}>
           <Image
             resizeMode="contain"
-            source={category === 'Brown' ? universityIcon() : searchIcon()} //TODO: Change
+            source={category === 'Brown' ? universityIcon() : searchIcon()} //TODO: Update for Cornell
             style={styles.categoryImage}
           />
         </View>
diff --git a/src/components/suggestedPeople/BadgesDropdown.tsx b/src/components/suggestedPeople/BadgesDropdown.tsx
index 3cf9775b..3a7eeb0f 100644
--- a/src/components/suggestedPeople/BadgesDropdown.tsx
+++ b/src/components/suggestedPeople/BadgesDropdown.tsx
@@ -81,13 +81,13 @@ const BadgesDropdown: React.FC<BadgesDropdownProps> = ({
         }}>
         {displayBadges ? (
           <UniversityIconClicked
-            university="brown" //TODO: Change
+            university="brown" //TODO: Update for Cornell
             style={styles.universityIconContainer}
             imageStyle={{width: normalize(31), height: normalize(38)}}
           />
         ) : (
           <UniversityIcon
-            university="brown" //TODO: Change
+            university="brown" //TODO: Update for Cornell
             style={styles.universityIconContainer}
             imageStyle={{width: normalize(31), height: normalize(38)}}
           />
diff --git a/src/components/suggestedPeople/UniversityIconClicked.tsx b/src/components/suggestedPeople/UniversityIconClicked.tsx
index bde4e17f..f23a8c16 100644
--- a/src/components/suggestedPeople/UniversityIconClicked.tsx
+++ b/src/components/suggestedPeople/UniversityIconClicked.tsx
@@ -20,6 +20,9 @@ const UniversityIconClicked: React.FC<UniversityIconClickedProps> = ({
 }) => {
   var universityIcon;
   switch (university) {
+    case 'cornell':
+      universityIcon = require('../../assets/universities/cornell-clicked.png');
+      break;
     case 'brown':
       universityIcon = require('../../assets/universities/brown-clicked.png');
       break;
diff --git a/src/constants/badges.ts b/src/constants/badges.ts
index 0507ed52..49b96df0 100644
--- a/src/constants/badges.ts
+++ b/src/constants/badges.ts
@@ -110,7 +110,7 @@ export const _cornellBadgeImages = {
   wrestling: require('../assets/images/badges/cornell/wrestling.png'),
   zeta_beta_tau: require('../assets/images/badges/cornell/zeta_beta_tau.png'),
   zeta_psi: require('../assets/images/badges/cornell/zeta_psi.png'),
-  zeta_phi_beta: require('../assets/images/badges/brown/zeta_phi_beta.png'),
+  zeta_phi_beta: require('../assets/images/badges/cornell/zeta_phi_beta.png'),
 };
 
 const _brownBadges = [
diff --git a/src/constants/constants.ts b/src/constants/constants.ts
index 6b513f4e..5f91e03d 100644
--- a/src/constants/constants.ts
+++ b/src/constants/constants.ts
@@ -187,7 +187,7 @@ export const EXPLORE_SECTION_TITLES: ExploreSectionType[] = [
   'New to Tagg',
   'People You May Know',
   'Trending on Tagg',
-  "Brown '24",
+  "Brown '24", //TODO: Update for Cornell
   "Brown '23",
   "Brown '22",
   "Brown '21",
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx
index 28e24299..ea660ed9 100644
--- a/src/screens/search/SearchScreen.tsx
+++ b/src/screens/search/SearchScreen.tsx
@@ -50,7 +50,7 @@ const SearchScreen: React.FC = () => {
   const top = Animated.useValue(-SCREEN_HEIGHT);
   const defaultButtons: SearchCategoryType[] = [21, 22, 23, 24].map((year) => ({
     id: -1,
-    name: `Brown '${year}`, //TODO: Change
+    name: `Brown '${year}`, //TODO: Update for Cornell
     category: 'Brown',
   }));
   const [keyboardVisible, setKeyboardVisible] = React.useState(
diff --git a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
index 16a64573..5275a186 100644
--- a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
+++ b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
@@ -166,7 +166,7 @@ const SuggestedPeopleUploadPictureScreen: React.FC<SuggestedPeopleUploadPictureS
             <View style={styles.editBadgesMainContainer}>
               <View style={styles.editBadgesSubContainer}>
                 <UniversityIcon
-                  university="brown" //TODO: Change
+                  university="brown" //TODO: Update for Cornell
                   imageStyle={{width: normalize(16), height: normalize(20)}}
                 />
                 <Text style={styles.editBadgesText}>Edit Badges</Text>
diff --git a/src/services/ExploreService.ts b/src/services/ExploreService.ts
index 07af91ad..df52b4e3 100644
--- a/src/services/ExploreService.ts
+++ b/src/services/ExploreService.ts
@@ -56,7 +56,7 @@ export const getAllExploreSections = async () => {
       'New to Tagg': data.categories.new_to_tagg,
       'People You May Know': data.categories.people_you_may_know,
       'Trending on Tagg': data.categories.trending_on_tagg,
-      "Brown '21": data.categories.brown_21,
+      "Brown '21": data.categories.brown_21, //TODO: Update for Cornell
       "Brown '22": data.categories.brown_22,
       "Brown '23": data.categories.brown_23,
       "Brown '24": data.categories.brown_24,
diff --git a/src/types/types.ts b/src/types/types.ts
index dc2817bd..cb6b5209 100644
--- a/src/types/types.ts
+++ b/src/types/types.ts
@@ -129,7 +129,7 @@ export type ExploreSectionType =
   | 'People You May Know'
   | 'New to Tagg'
   | 'Trending on Tagg'
-  | "Brown '21"
+  | "Brown '21" //TODO: Update for Cornell
   | "Brown '22"
   | "Brown '23"
   | "Brown '24";
-- 
cgit v1.2.3-70-g09d2


From 8ce46790a8d12df6738d8ac17462ba57e2b0e6b9 Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 24 Mar 2021 16:09:45 -0700
Subject: Cornell Changes

---
 src/components/profile/ProfileHeader.tsx           |  7 ++--
 src/components/profile/UniversityIcon.tsx          |  8 ++--
 src/components/search/SearchBar.tsx                |  8 +++-
 src/components/search/SearchResultCell.tsx         | 19 +++++++---
 src/components/suggestedPeople/BadgesDropdown.tsx  |  8 ++--
 .../suggestedPeople/UniversityIconClicked.tsx      |  8 ++--
 src/constants/badges.ts                            |  8 ++--
 src/constants/constants.ts                         |  2 +-
 src/screens/badge/BadgeScreenHeader.tsx            |  9 +++--
 src/screens/badge/BadgeSelection.tsx               | 23 +++++++-----
 src/screens/search/SearchScreen.tsx                |  8 +++-
 src/screens/suggestedPeople/SPBody.tsx             |  7 ++--
 .../SuggestedPeopleUploadPictureScreen.tsx         | 10 +++--
 src/services/UserProfileService.ts                 |  2 +
 src/store/initialStates.ts                         |  2 +-
 src/types/types.ts                                 | 13 ++++++-
 src/utils/common.ts                                | 43 +++++++++++++++++++++-
 src/utils/search.ts                                |  6 +--
 18 files changed, 135 insertions(+), 56 deletions(-)

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

diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 9d9a5cbd..0b93de98 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -4,7 +4,7 @@ import {useSelector} from 'react-redux';
 import UniversityIcon from './UniversityIcon';
 import {PROFILE_CUTOUT_TOP_Y} from '../../constants';
 import {RootState} from '../../store/rootreducer';
-import {ScreenType} from '../../types';
+import {ScreenType, Universities} from '../../types';
 import {normalize} from '../../utils';
 import Avatar from './Avatar';
 import FriendsCount from './FriendsCount';
@@ -24,7 +24,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
   handleBlockUnblock,
 }) => {
   const {
-    profile: {name = '', university_class = 2021} = {},
+    profile: {name = '', university_class = 2021, university = Universities.cornell} = {},
     user: {username: userXName = ''},
   } = userXId
     ? useSelector((state: RootState) => state.userX[screenType][userXId])
@@ -60,8 +60,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
           <View style={styles.friendsAndUniversity}>
             <FriendsCount screenType={screenType} userXId={userXId} />
             <UniversityIcon
-              university="brown" //TODO: Update for Cornell
-              university_class={university_class}
+              {...{university, university_class}}
             />
           </View>
         </View>
diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index d738e745..1642b8f0 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -2,9 +2,9 @@ import React from 'react';
 import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
 import {Image, Text, View} from 'react-native-animatable';
 import {getUniversityClass, normalize} from '../../utils';
-
+import {Universities} from '../../types';
 export interface UniversityIconProps extends ViewProps {
-  university: string;
+  university: Universities;
   university_class?: number;
   imageStyle?: StyleProp<ImageStyle>;
 }
@@ -20,10 +20,10 @@ const UniversityIcon: React.FC<UniversityIconProps> = ({
 }) => {
   var universityIcon;
   switch (university) {
-    case 'cornell':
+    case 'Cornell':
       universityIcon = require('../../assets/universities/cornell.png');
       break;
-    case 'brown':
+    case 'Brown':
       universityIcon = require('../../assets/universities/brown.png');
       break;
     default:
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx
index 62bda77e..5008ff53 100644
--- a/src/components/search/SearchBar.tsx
+++ b/src/components/search/SearchBar.tsx
@@ -14,6 +14,9 @@ import Animated, {interpolate} from 'react-native-reanimated';
 import Icon from 'react-native-vector-icons/Feather';
 import {normalize} from 'react-native-elements';
 import {SCREEN_HEIGHT, getSearchSuggestions} from '../../utils';
+import {useSelector} from 'react-redux';
+import {RootState} from '../../store/rootReducer';
+import {Universities} from '../../types';
 
 const AnimatedIcon = Animated.createAnimatedComponent(Icon);
 
@@ -37,9 +40,12 @@ const SearchBar: React.FC<SearchBarProps> = ({
     e.preventDefault();
     Keyboard.dismiss();
   };
+  const {profile: {university = Universities.cornell} = {}} = useSelector(
+    (state: RootState) => state.user,
+  );
   const DEFAULT_PLACEHOLDER: string = 'Search';
   // the list of suggestions to cycle through. TODO: get this from the backend
-  const SEARCH_SUGGESTIONS: string[] = getSearchSuggestions();
+  const SEARCH_SUGGESTIONS: string[] = getSearchSuggestions(university);
   /*
    * index & id of current placeholder, used in selecting next placeholder. -1
    * indicates DEFAULT_PLACEHOLDER. TODO: make it appear more random by tracking
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx
index 4484bcd3..6ebe19a6 100644
--- a/src/components/search/SearchResultCell.tsx
+++ b/src/components/search/SearchResultCell.tsx
@@ -2,7 +2,7 @@ import {useNavigation} from '@react-navigation/native';
 import React, {useEffect, useState} from 'react';
 import {Alert, Image, StyleSheet, Text, View} from 'react-native';
 import {TouchableOpacity} from 'react-native-gesture-handler';
-import {useDispatch, useStore} from 'react-redux';
+import {useDispatch, useSelector, useStore} from 'react-redux';
 import {ERROR_UNABLE_TO_VIEW_PROFILE} from '../../constants/strings';
 import {loadImageFromURL} from '../../services';
 import {RootState} from '../../store/rootReducer';
@@ -10,11 +10,13 @@ import {
   CategoryPreviewType,
   ProfilePreviewType,
   ScreenType,
+  Universities,
   UserType,
 } from '../../types';
 import {
   addCategoryToRecentlySearched,
   addUserToRecentlySearched,
+  getUniversityBadge,
   normalize,
   SCREEN_WIDTH,
 } from '../../utils';
@@ -43,6 +45,11 @@ const SearchResultsCell: React.FC<SearchResults> = ({
   loggedInUser,
 }) => {
   const [avatar, setAvatar] = useState<string | undefined>(undefined);
+
+  const {profile: {university = Universities.cornell} = {}} = useSelector(
+    (state: RootState) => state.user,
+  );
+
   useEffect(() => {
     (async () => {
       if (thumbnail_url !== undefined) {
@@ -143,17 +150,17 @@ const SearchResultsCell: React.FC<SearchResults> = ({
     return require('../../assets/images/search.png');
   };
 
-  const universityIcon = () => {
-    return require('../../assets/images/bwbadges.png');
-  };
-
   const categoryCell = () => {
     return (
       <TouchableOpacity style={styles.cellContainer} onPress={onPressCategory}>
         <View style={[styles.imageContainer, styles.categoryBackground]}>
           <Image
             resizeMode="contain"
-            source={category === 'Brown' ? universityIcon() : searchIcon()} //TODO: Update for Cornell
+            source={
+              category in Universities
+                ? getUniversityBadge(university, 'Search')
+                : searchIcon()
+            }
             style={styles.categoryImage}
           />
         </View>
diff --git a/src/components/suggestedPeople/BadgesDropdown.tsx b/src/components/suggestedPeople/BadgesDropdown.tsx
index 3a7eeb0f..f8e7bdaa 100644
--- a/src/components/suggestedPeople/BadgesDropdown.tsx
+++ b/src/components/suggestedPeople/BadgesDropdown.tsx
@@ -4,11 +4,12 @@ import {Image, StyleSheet} from 'react-native';
 import {TouchableOpacity} from 'react-native-gesture-handler';
 import LinearGradient from 'react-native-linear-gradient';
 import Animated, {Easing} from 'react-native-reanimated';
-import {UniversityBadge} from 'src/types';
+import {Universities, UniversityBadge} from '../../types';
 import {UniversityIcon} from '..';
 import {normalize, SCREEN_WIDTH} from '../../utils';
 import UniversityIconClicked from './UniversityIconClicked';
 interface BadgesDropdownProps {
+  university: Universities;
   localBadges: {
     badge: UniversityBadge;
     img: string;
@@ -17,6 +18,7 @@ interface BadgesDropdownProps {
 }
 
 const BadgesDropdown: React.FC<BadgesDropdownProps> = ({
+  university,
   localBadges,
   badges,
 }) => {
@@ -81,13 +83,13 @@ const BadgesDropdown: React.FC<BadgesDropdownProps> = ({
         }}>
         {displayBadges ? (
           <UniversityIconClicked
-            university="brown" //TODO: Update for Cornell
+            university={university}
             style={styles.universityIconContainer}
             imageStyle={{width: normalize(31), height: normalize(38)}}
           />
         ) : (
           <UniversityIcon
-            university="brown" //TODO: Update for Cornell
+            university={university}
             style={styles.universityIconContainer}
             imageStyle={{width: normalize(31), height: normalize(38)}}
           />
diff --git a/src/components/suggestedPeople/UniversityIconClicked.tsx b/src/components/suggestedPeople/UniversityIconClicked.tsx
index f23a8c16..7a0f3442 100644
--- a/src/components/suggestedPeople/UniversityIconClicked.tsx
+++ b/src/components/suggestedPeople/UniversityIconClicked.tsx
@@ -2,9 +2,9 @@ import React from 'react';
 import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
 import {Image, Text, View} from 'react-native-animatable';
 import {getUniversityClass, normalize} from '../../utils';
-
+import {Universities} from '../../types';
 export interface UniversityIconClickedProps extends ViewProps {
-  university: string;
+  university: Universities;
   university_class?: number;
   imageStyle?: StyleProp<ImageStyle>;
 }
@@ -20,10 +20,10 @@ const UniversityIconClicked: React.FC<UniversityIconClickedProps> = ({
 }) => {
   var universityIcon;
   switch (university) {
-    case 'cornell':
+    case 'Cornell':
       universityIcon = require('../../assets/universities/cornell-clicked.png');
       break;
-    case 'brown':
+    case 'Brown':
       universityIcon = require('../../assets/universities/brown-clicked.png');
       break;
     default:
diff --git a/src/constants/badges.ts b/src/constants/badges.ts
index 49b96df0..b56ac34e 100644
--- a/src/constants/badges.ts
+++ b/src/constants/badges.ts
@@ -1,3 +1,5 @@
+import {BadgeDataType} from '../types';
+
 export const _brownBadgeImages = {
   acapella: require('../assets/images/badges/brown/acapella.png'),
   alpha_chi_omega: require('../assets/images/badges/brown/alpha_chi_omega.png'),
@@ -492,7 +494,7 @@ const _cornellBadges = [
   },
 ];
 
-export const BADGE_DATA = {
-  'Brown University': _brownBadges,
-  'Cornell University': _cornellBadges,
+export const BADGE_DATA: BadgeDataType = {
+  Brown: _brownBadges,
+  Cornell: _cornellBadges,
 };
diff --git a/src/constants/constants.ts b/src/constants/constants.ts
index 5f91e03d..c2ba11b2 100644
--- a/src/constants/constants.ts
+++ b/src/constants/constants.ts
@@ -187,7 +187,7 @@ export const EXPLORE_SECTION_TITLES: ExploreSectionType[] = [
   'New to Tagg',
   'People You May Know',
   'Trending on Tagg',
-  "Brown '24", //TODO: Update for Cornell
+  "Brown '24", 
   "Brown '23",
   "Brown '22",
   "Brown '21",
diff --git a/src/screens/badge/BadgeScreenHeader.tsx b/src/screens/badge/BadgeScreenHeader.tsx
index 300869e9..746e05d9 100644
--- a/src/screens/badge/BadgeScreenHeader.tsx
+++ b/src/screens/badge/BadgeScreenHeader.tsx
@@ -1,19 +1,20 @@
 import React from 'react';
 import {Image, StyleSheet, Text, View} from 'react-native';
-import {normalize} from '../../utils';
+import { Universities } from 'src/types';
+import {getUniversityBadge, normalize} from '../../utils';
 
 interface BadgeScreenHeaderProps {
-  university: string;
+  university: Universities;
 }
 
 const BadgeScreenHeader: React.FC<BadgeScreenHeaderProps> = ({university}) => {
   return (
     <View style={styles.container}>
       <Image
-        source={require('../../assets/images/badges/brown/brown_badge.png')}
+        source={getUniversityBadge(university, 'Crest')}
       />
       <View style={styles.universityTextContainer}>
-        <Text style={styles.universityText}>{university} Badges</Text>
+        <Text style={styles.universityText}>{university} University Badges</Text>
       </View>
       <View style={styles.searchTextContainer}>
         <Text style={styles.searchText}>
diff --git a/src/screens/badge/BadgeSelection.tsx b/src/screens/badge/BadgeSelection.tsx
index 35e91939..08cad020 100644
--- a/src/screens/badge/BadgeSelection.tsx
+++ b/src/screens/badge/BadgeSelection.tsx
@@ -15,7 +15,7 @@ import {BACKGROUND_GRADIENT_MAP} from '../../constants';
 import {BADGE_DATA} from '../../constants/badges';
 import {ERROR_BADGES_EXCEED_LIMIT} from '../../constants/strings';
 import {suggestedPeopleBadgesFinished} from '../../store/actions';
-import {BackgroundGradientType} from '../../types';
+import {BackgroundGradientType, Universities} from '../../types';
 import {SCREEN_HEIGHT, StatusBarHeight} from '../../utils';
 import BadgeList from './BadgeList';
 import BadgeScreenHeader from './BadgeScreenHeader';
@@ -34,9 +34,10 @@ type BadgeSelectionProps = {
 
 const BadgeSelection: React.FC<BadgeSelectionProps> = ({route}) => {
   const {editing} = route.params;
-  const {userId: loggedInUserId} = useSelector(
-    (state: RootState) => state.user.user,
-  );
+  const {
+    user: {userId: loggedInUserId},
+    profile: {university = Universities.brown},
+  } = useSelector((state: RootState) => state.user);
   const [selectedBadges, setSelectedBadges] = useState<string[]>([]);
   const dispatch = useDispatch();
   const navigation = useNavigation();
@@ -114,18 +115,20 @@ const BadgeSelection: React.FC<BadgeSelectionProps> = ({route}) => {
       <StatusBar barStyle={'light-content'} />
       <SafeAreaView>
         <View style={styles.listContainer}>
-          <BadgeScreenHeader university={'Cornell University'} />
+          <BadgeScreenHeader {...{university}} />
           {/* filter not working, comment out for now */}
           {/* <SearchBar
             style={styles.searchBarStyle}
             onCancel={() => {}}
             top={Animated.useValue(0)}
           /> */}
-          <BadgeList
-            data={BADGE_DATA['Cornell University']}
-            selectedBadges={selectedBadges}
-            selectKey={selectKey}
-          />
+          {university && (
+            <BadgeList
+              data={BADGE_DATA[university]}
+              selectedBadges={selectedBadges}
+              selectKey={selectKey}
+            />
+          )}
         </View>
       </SafeAreaView>
     </LinearGradient>
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx
index ea660ed9..7e84b372 100644
--- a/src/screens/search/SearchScreen.tsx
+++ b/src/screens/search/SearchScreen.tsx
@@ -22,6 +22,7 @@ import {
   ProfilePreviewType,
   ScreenType,
   SearchCategoryType,
+  Universities,
 } from '../../types';
 import {
   getRecentlySearchedCategories,
@@ -38,6 +39,9 @@ import {
 
 const SearchScreen: React.FC = () => {
   const {recentSearches} = useSelector((state: RootState) => state.taggUsers);
+  const {profile: {university = Universities.cornell} = {}} = useSelector(
+    (state: RootState) => state.user,
+  );
   const [query, setQuery] = useState<string>('');
   const [results, setResults] = useState<Array<any> | undefined>(undefined);
   const [recents, setRecents] = useState<Array<ProfilePreviewType>>(
@@ -50,8 +54,8 @@ const SearchScreen: React.FC = () => {
   const top = Animated.useValue(-SCREEN_HEIGHT);
   const defaultButtons: SearchCategoryType[] = [21, 22, 23, 24].map((year) => ({
     id: -1,
-    name: `Brown '${year}`, //TODO: Update for Cornell
-    category: 'Brown',
+    name: `${university} '${year}`,
+    category: university,
   }));
   const [keyboardVisible, setKeyboardVisible] = React.useState(
     'keyboardVisible',
diff --git a/src/screens/suggestedPeople/SPBody.tsx b/src/screens/suggestedPeople/SPBody.tsx
index 067eadb1..c4195fac 100644
--- a/src/screens/suggestedPeople/SPBody.tsx
+++ b/src/screens/suggestedPeople/SPBody.tsx
@@ -27,6 +27,7 @@ interface SPBodyProps {
 const SPBody: React.FC<SPBodyProps> = ({
   item: {
     user,
+    university,
     mutual_friends,
     social_links,
     suggested_people_url,
@@ -50,7 +51,7 @@ const SPBody: React.FC<SPBodyProps> = ({
   useEffect(() => {
     const newBadges: {badge: UniversityBadge; img: any}[] = [];
     const findBadgeIcons = (badge: UniversityBadge) => {
-      BADGE_DATA['Cornell University']?.forEach((item) => {
+      BADGE_DATA[university]?.forEach((item) => {
         if (item.title === badge.category) {
           item.data.forEach((object) => {
             if (object.badgeName === badge.name) {
@@ -120,7 +121,7 @@ const SPBody: React.FC<SPBodyProps> = ({
     return (
       <TouchableOpacity
         onPress={() => {
-          navigation.push('Profile', {
+          navigation.navigate('Profile', {
             userXId: loggedInUserId === user.id ? undefined : user.id,
             screenType,
           });
@@ -139,7 +140,7 @@ const SPBody: React.FC<SPBodyProps> = ({
         <View style={styles.topContainer}>
           <Text style={styles.title}>{firstItem && 'Suggested People'}</Text>
           {localBadges && (
-            <BadgesDropdown localBadges={localBadges} badges={badges} />
+            <BadgesDropdown {...{university, localBadges, badges}} />
           )}
         </View>
         <View style={styles.body}>
diff --git a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
index 5275a186..378e69c5 100644
--- a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
+++ b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
@@ -14,6 +14,7 @@ import ImagePicker from 'react-native-image-crop-picker';
 import {SafeAreaView} from 'react-native-safe-area-context';
 import {useDispatch, useSelector} from 'react-redux';
 import {MainStackParams} from 'src/routes';
+import {Universities} from '../../types';
 import FrontArrow from '../../assets/icons/front-arrow.svg';
 import {TaggSquareButton, UniversityIcon} from '../../components';
 import TaggLoadingIndicator from '../../components/common/TaggLoadingIndicator';
@@ -49,9 +50,10 @@ const SuggestedPeopleUploadPictureScreen: React.FC<SuggestedPeopleUploadPictureS
   const [loading, setLoading] = useState(false);
   const dispatch = useDispatch();
   const navigation = useNavigation();
-  const {userId: loggedInUserId} = useSelector(
-    (state: RootState) => state.user.user,
-  );
+  const {
+    user: {userId: loggedInUserId},
+    profile: {university = Universities.brown},
+  } = useSelector((state: RootState) => state.user);
 
   useEffect(() => {
     const loadData = async () => {
@@ -166,7 +168,7 @@ const SuggestedPeopleUploadPictureScreen: React.FC<SuggestedPeopleUploadPictureS
             <View style={styles.editBadgesMainContainer}>
               <View style={styles.editBadgesSubContainer}>
                 <UniversityIcon
-                  university="brown" //TODO: Update for Cornell
+                  university={university}
                   imageStyle={{width: normalize(16), height: normalize(20)}}
                 />
                 <Text style={styles.editBadgesText}>Edit Badges</Text>
diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts
index dd77db9f..22492124 100644
--- a/src/services/UserProfileService.ts
+++ b/src/services/UserProfileService.ts
@@ -48,6 +48,7 @@ export const loadProfileInfo = async (token: string, userId: string) => {
         gender,
         snapchat,
         tiktok,
+        university,
         university_class,
         profile_completion_stage,
         suggested_people_linked,
@@ -63,6 +64,7 @@ export const loadProfileInfo = async (token: string, userId: string) => {
         gender,
         snapchat,
         tiktok,
+        university,
         university_class,
         profile_completion_stage,
         suggested_people_linked,
diff --git a/src/store/initialStates.ts b/src/store/initialStates.ts
index b43e4a1d..e1b4b127 100644
--- a/src/store/initialStates.ts
+++ b/src/store/initialStates.ts
@@ -18,7 +18,7 @@ export const NO_PROFILE: ProfileType = {
   gender: '',
   birthday: undefined,
   university_class: 2021,
-
+  university: undefined,
   //Default to an invalid value and ignore it gracefully while showing tutorials / popups.
   profile_completion_stage: -1,
   suggested_people_linked: -1,
diff --git a/src/types/types.ts b/src/types/types.ts
index cb6b5209..8a4474dc 100644
--- a/src/types/types.ts
+++ b/src/types/types.ts
@@ -21,11 +21,16 @@ export interface CategoryPreviewType {
 
 export type FriendshipStatusType = 'friends' | 'requested' | 'no_record';
 
+export enum Universities {
+  brown = 'Brown',
+  cornell = 'Cornell',
+}
 export interface ProfileType {
   name: string;
   biography: string;
   website: string;
   gender: string;
+  university: Universities | undefined;
   university_class: number;
   profile_completion_stage: number;
   suggested_people_linked: number;
@@ -129,7 +134,7 @@ export type ExploreSectionType =
   | 'People You May Know'
   | 'New to Tagg'
   | 'Trending on Tagg'
-  | "Brown '21" //TODO: Update for Cornell
+  | "Brown '21"
   | "Brown '22"
   | "Brown '23"
   | "Brown '24";
@@ -233,12 +238,13 @@ export type TypeOfNotification =
 export type UniversityBadge = {
   id: number;
   name: string;
-  university: string;
+  university: Universities;
   category: string;
 };
 
 export type SuggestedPeopleDataType = {
   user: ProfilePreviewType;
+  university: Universities;
   mutual_friends: ProfilePreviewType[];
   badges: UniversityBadge[];
   social_links: string[];
@@ -262,3 +268,6 @@ export type ContactType = {
   first_name: string;
   last_name: string;
 };
+
+export type UniversityBadgeType = 'Search' | 'Crest';
+export type BadgeDataType = Record<Universities, any>;
diff --git a/src/utils/common.ts b/src/utils/common.ts
index 0a76ec08..fdc6b875 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -1,4 +1,9 @@
-import {ContactType, NotificationType} from './../types/types';
+import {
+  ContactType,
+  NotificationType,
+  Universities,
+  UniversityBadgeType,
+} from './../types/types';
 import moment from 'moment';
 import {Linking} from 'react-native';
 import {BROWSABLE_SOCIAL_URLS, TOGGLE_BUTTON_TYPE} from '../constants';
@@ -132,3 +137,39 @@ export const extractContacts = async () => {
   });
   return retrievedContacts;
 };
+
+export const getUniversityBadge = (
+  university: Universities,
+  type: UniversityBadgeType,
+) => {
+  switch (type) {
+    case 'Search':
+      return _searchPageIcon(university);
+    case 'Crest':
+      return _crestIcon(university);
+    default:
+      return require('../assets/images/bwbadges.png');
+  }
+};
+
+const _searchPageIcon = (university: Universities) => {
+  switch (university) {
+    case 'Cornell':
+      return require('../assets/universities/cornell-search.png');
+    case 'Brown':
+      return require('../assets/images/bwbadges.png');
+    default:
+      return require('../assets/images/bwbadges.png');
+  }
+};
+
+const _crestIcon = (university: Universities) => {
+  switch (university) {
+    case 'Cornell':
+      return require('../assets/universities/cornell.png');
+    case 'Brown':
+      return require('../assets/universities/brown.png');
+    default:
+      return require('../assets/images/bwbadges.png');
+  }
+};
diff --git a/src/utils/search.ts b/src/utils/search.ts
index bdd6c042..aa9a7463 100644
--- a/src/utils/search.ts
+++ b/src/utils/search.ts
@@ -1,14 +1,14 @@
 import AsyncStorage from '@react-native-community/async-storage';
 
 import {BADGE_DATA} from '../constants/badges';
-import {ProfilePreviewType, CategoryPreviewType} from '../types';
+import {ProfilePreviewType, CategoryPreviewType, Universities} from '../types';
 
 /*
  * Gets all possible search suggestions.
  */
-export const getSearchSuggestions = (): string[] => {
+export const getSearchSuggestions = (university : Universities): string[] => {
   const suggestions: string[] = [];
-  for (const category of BADGE_DATA['Cornell University']) {
+  for (const category of BADGE_DATA[university]) {
     for (const interest of category.data) {
       suggestions.push(interest.badgeName);
     }
-- 
cgit v1.2.3-70-g09d2


From 64785e6527e521ce14e32edcc80adc6253b48657 Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@tagg.id>
Date: Fri, 26 Mar 2021 22:40:00 -0400
Subject: renamed to UniversityType, applied to all

---
 src/components/profile/ProfileHeader.tsx           | 16 ++++++--------
 src/components/profile/UniversityIcon.tsx          | 25 +++++++---------------
 src/components/search/SearchBar.tsx                | 21 ++++++++----------
 src/components/search/SearchResultCell.tsx         |  8 +++----
 src/components/suggestedPeople/BadgesDropdown.tsx  |  4 ++--
 .../suggestedPeople/UniversityIconClicked.tsx      |  8 +++----
 src/constants/badges.ts                            |  5 +++--
 src/screens/badge/BadgeScreenHeader.tsx            | 13 ++++++++---
 src/screens/badge/BadgeSelection.tsx               |  4 ++--
 src/screens/search/SearchScreen.tsx                |  9 ++++----
 .../suggestedPeople/SuggestedPeopleScreen.tsx      |  9 --------
 .../SuggestedPeopleUploadPictureScreen.tsx         |  4 ++--
 src/types/types.ts                                 |  2 +-
 src/utils/common.ts                                | 16 +++++++-------
 src/utils/search.ts                                | 16 ++++++++++----
 15 files changed, 75 insertions(+), 85 deletions(-)

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

diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx
index 0b93de98..2c623c2b 100644
--- a/src/components/profile/ProfileHeader.tsx
+++ b/src/components/profile/ProfileHeader.tsx
@@ -1,14 +1,14 @@
 import React, {useState} from 'react';
 import {StyleSheet, Text, View} from 'react-native';
 import {useSelector} from 'react-redux';
-import UniversityIcon from './UniversityIcon';
 import {PROFILE_CUTOUT_TOP_Y} from '../../constants';
 import {RootState} from '../../store/rootreducer';
-import {ScreenType, Universities} from '../../types';
+import {ScreenType} from '../../types';
 import {normalize} from '../../utils';
 import Avatar from './Avatar';
 import FriendsCount from './FriendsCount';
 import ProfileMoreInfoDrawer from './ProfileMoreInfoDrawer';
+import UniversityIcon from './UniversityIcon';
 
 type ProfileHeaderProps = {
   userXId: string | undefined;
@@ -24,11 +24,11 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
   handleBlockUnblock,
 }) => {
   const {
-    profile: {name = '', university_class = 2021, university = Universities.cornell} = {},
+    profile: {name = '', university_class = 2021, university},
     user: {username: userXName = ''},
-  } = userXId
-    ? useSelector((state: RootState) => state.userX[screenType][userXId])
-    : useSelector((state: RootState) => state.user);
+  } = useSelector((state: RootState) =>
+    userXId ? state.userX[screenType][userXId] : state.user,
+  );
   const [drawerVisible, setDrawerVisible] = useState(false);
   const [firstName, lastName] = [...name.split(' ')];
   return (
@@ -59,9 +59,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
           )}
           <View style={styles.friendsAndUniversity}>
             <FriendsCount screenType={screenType} userXId={userXId} />
-            <UniversityIcon
-              {...{university, university_class}}
-            />
+            <UniversityIcon {...{university, university_class}} />
           </View>
         </View>
       </View>
diff --git a/src/components/profile/UniversityIcon.tsx b/src/components/profile/UniversityIcon.tsx
index 1642b8f0..4cb1abe6 100644
--- a/src/components/profile/UniversityIcon.tsx
+++ b/src/components/profile/UniversityIcon.tsx
@@ -1,10 +1,11 @@
 import React from 'react';
 import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
 import {Image, Text, View} from 'react-native-animatable';
-import {getUniversityClass, normalize} from '../../utils';
-import {Universities} from '../../types';
+import {getUniversityBadge, getUniversityClass, normalize} from '../../utils';
+import {UniversityType} from '../../types';
+
 export interface UniversityIconProps extends ViewProps {
-  university: Universities;
+  university: UniversityType;
   university_class?: number;
   imageStyle?: StyleProp<ImageStyle>;
 }
@@ -18,22 +19,12 @@ const UniversityIcon: React.FC<UniversityIconProps> = ({
   university_class,
   imageStyle,
 }) => {
-  var universityIcon;
-  switch (university) {
-    case 'Cornell':
-      universityIcon = require('../../assets/universities/cornell.png');
-      break;
-    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, imageStyle]} />
+      <Image
+        source={getUniversityBadge(university, 'Crest')}
+        style={[styles.icon, imageStyle]}
+      />
       {university_class && (
         <Text style={styles.univClass}>
           {getUniversityClass(university_class)}
diff --git a/src/components/search/SearchBar.tsx b/src/components/search/SearchBar.tsx
index 5008ff53..4824b56f 100644
--- a/src/components/search/SearchBar.tsx
+++ b/src/components/search/SearchBar.tsx
@@ -1,22 +1,21 @@
-import React, {useState, useEffect} from 'react';
+import React, {useEffect, useState} from 'react';
 import {
+  Keyboard,
+  NativeSyntheticEvent,
   StyleSheet,
-  TextInput,
-  TouchableOpacity,
   Text,
-  View,
+  TextInput,
   TextInputProps,
-  Keyboard,
-  NativeSyntheticEvent,
   TextInputSubmitEditingEventData,
+  TouchableOpacity,
+  View,
 } from 'react-native';
+import {normalize} from 'react-native-elements';
 import Animated, {interpolate} from 'react-native-reanimated';
 import Icon from 'react-native-vector-icons/Feather';
-import {normalize} from 'react-native-elements';
-import {SCREEN_HEIGHT, getSearchSuggestions} from '../../utils';
 import {useSelector} from 'react-redux';
 import {RootState} from '../../store/rootReducer';
-import {Universities} from '../../types';
+import {getSearchSuggestions, SCREEN_HEIGHT} from '../../utils';
 
 const AnimatedIcon = Animated.createAnimatedComponent(Icon);
 
@@ -40,9 +39,7 @@ const SearchBar: React.FC<SearchBarProps> = ({
     e.preventDefault();
     Keyboard.dismiss();
   };
-  const {profile: {university = Universities.cornell} = {}} = useSelector(
-    (state: RootState) => state.user,
-  );
+  const {university} = useSelector((state: RootState) => state.user.profile);
   const DEFAULT_PLACEHOLDER: string = 'Search';
   // the list of suggestions to cycle through. TODO: get this from the backend
   const SEARCH_SUGGESTIONS: string[] = getSearchSuggestions(university);
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx
index 6ebe19a6..5a6ea110 100644
--- a/src/components/search/SearchResultCell.tsx
+++ b/src/components/search/SearchResultCell.tsx
@@ -10,7 +10,7 @@ import {
   CategoryPreviewType,
   ProfilePreviewType,
   ScreenType,
-  Universities,
+  UniversityType,
   UserType,
 } from '../../types';
 import {
@@ -46,9 +46,7 @@ const SearchResultsCell: React.FC<SearchResults> = ({
 }) => {
   const [avatar, setAvatar] = useState<string | undefined>(undefined);
 
-  const {profile: {university = Universities.cornell} = {}} = useSelector(
-    (state: RootState) => state.user,
-  );
+  const {university} = useSelector((state: RootState) => state.user.profile);
 
   useEffect(() => {
     (async () => {
@@ -157,7 +155,7 @@ const SearchResultsCell: React.FC<SearchResults> = ({
           <Image
             resizeMode="contain"
             source={
-              category in Universities
+              category in UniversityType
                 ? getUniversityBadge(university, 'Search')
                 : searchIcon()
             }
diff --git a/src/components/suggestedPeople/BadgesDropdown.tsx b/src/components/suggestedPeople/BadgesDropdown.tsx
index f8e7bdaa..bc4e7a54 100644
--- a/src/components/suggestedPeople/BadgesDropdown.tsx
+++ b/src/components/suggestedPeople/BadgesDropdown.tsx
@@ -4,12 +4,12 @@ import {Image, StyleSheet} from 'react-native';
 import {TouchableOpacity} from 'react-native-gesture-handler';
 import LinearGradient from 'react-native-linear-gradient';
 import Animated, {Easing} from 'react-native-reanimated';
-import {Universities, UniversityBadge} from '../../types';
+import {UniversityType, UniversityBadge} from '../../types';
 import {UniversityIcon} from '..';
 import {normalize, SCREEN_WIDTH} from '../../utils';
 import UniversityIconClicked from './UniversityIconClicked';
 interface BadgesDropdownProps {
-  university: Universities;
+  university: UniversityType;
   localBadges: {
     badge: UniversityBadge;
     img: string;
diff --git a/src/components/suggestedPeople/UniversityIconClicked.tsx b/src/components/suggestedPeople/UniversityIconClicked.tsx
index 7a0f3442..41e27c8e 100644
--- a/src/components/suggestedPeople/UniversityIconClicked.tsx
+++ b/src/components/suggestedPeople/UniversityIconClicked.tsx
@@ -2,9 +2,9 @@ import React from 'react';
 import {ImageStyle, StyleProp, StyleSheet, ViewProps} from 'react-native';
 import {Image, Text, View} from 'react-native-animatable';
 import {getUniversityClass, normalize} from '../../utils';
-import {Universities} from '../../types';
+import {UniversityType} from '../../types';
 export interface UniversityIconClickedProps extends ViewProps {
-  university: Universities;
+  university: UniversityType;
   university_class?: number;
   imageStyle?: StyleProp<ImageStyle>;
 }
@@ -20,10 +20,10 @@ const UniversityIconClicked: React.FC<UniversityIconClickedProps> = ({
 }) => {
   var universityIcon;
   switch (university) {
-    case 'Cornell':
+    case UniversityType.Cornell:
       universityIcon = require('../../assets/universities/cornell-clicked.png');
       break;
-    case 'Brown':
+    case UniversityType.Brown:
       universityIcon = require('../../assets/universities/brown-clicked.png');
       break;
     default:
diff --git a/src/constants/badges.ts b/src/constants/badges.ts
index b56ac34e..5a7b4671 100644
--- a/src/constants/badges.ts
+++ b/src/constants/badges.ts
@@ -495,6 +495,7 @@ const _cornellBadges = [
 ];
 
 export const BADGE_DATA: BadgeDataType = {
-  Brown: _brownBadges,
-  Cornell: _cornellBadges,
+  'Brown University': _brownBadges,
+  'Cornell University': _cornellBadges,
+  '': [],
 };
diff --git a/src/screens/badge/BadgeScreenHeader.tsx b/src/screens/badge/BadgeScreenHeader.tsx
index 746e05d9..46c0c1c8 100644
--- a/src/screens/badge/BadgeScreenHeader.tsx
+++ b/src/screens/badge/BadgeScreenHeader.tsx
@@ -1,10 +1,10 @@
 import React from 'react';
 import {Image, StyleSheet, Text, View} from 'react-native';
-import { Universities } from 'src/types';
+import {UniversityType} from 'src/types';
 import {getUniversityBadge, normalize} from '../../utils';
 
 interface BadgeScreenHeaderProps {
-  university: Universities;
+  university: UniversityType;
 }
 
 const BadgeScreenHeader: React.FC<BadgeScreenHeaderProps> = ({university}) => {
@@ -12,9 +12,12 @@ const BadgeScreenHeader: React.FC<BadgeScreenHeaderProps> = ({university}) => {
     <View style={styles.container}>
       <Image
         source={getUniversityBadge(university, 'Crest')}
+        style={styles.icon}
       />
       <View style={styles.universityTextContainer}>
-        <Text style={styles.universityText}>{university} University Badges</Text>
+        <Text style={styles.universityText}>
+          {university} University Badges
+        </Text>
       </View>
       <View style={styles.searchTextContainer}>
         <Text style={styles.searchText}>
@@ -44,6 +47,10 @@ const styles = StyleSheet.create({
     lineHeight: normalize(17.9),
     color: 'white',
   },
+  icon: {
+    aspectRatio: 675 / 750,
+    height: 40,
+  },
 });
 
 export default BadgeScreenHeader;
diff --git a/src/screens/badge/BadgeSelection.tsx b/src/screens/badge/BadgeSelection.tsx
index 08cad020..deaefb52 100644
--- a/src/screens/badge/BadgeSelection.tsx
+++ b/src/screens/badge/BadgeSelection.tsx
@@ -15,7 +15,7 @@ import {BACKGROUND_GRADIENT_MAP} from '../../constants';
 import {BADGE_DATA} from '../../constants/badges';
 import {ERROR_BADGES_EXCEED_LIMIT} from '../../constants/strings';
 import {suggestedPeopleBadgesFinished} from '../../store/actions';
-import {BackgroundGradientType, Universities} from '../../types';
+import {BackgroundGradientType, UniversityType} from '../../types';
 import {SCREEN_HEIGHT, StatusBarHeight} from '../../utils';
 import BadgeList from './BadgeList';
 import BadgeScreenHeader from './BadgeScreenHeader';
@@ -36,7 +36,7 @@ const BadgeSelection: React.FC<BadgeSelectionProps> = ({route}) => {
   const {editing} = route.params;
   const {
     user: {userId: loggedInUserId},
-    profile: {university = Universities.brown},
+    profile: {university},
   } = useSelector((state: RootState) => state.user);
   const [selectedBadges, setSelectedBadges] = useState<string[]>([]);
   const dispatch = useDispatch();
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx
index 7e84b372..683d25f4 100644
--- a/src/screens/search/SearchScreen.tsx
+++ b/src/screens/search/SearchScreen.tsx
@@ -22,7 +22,6 @@ import {
   ProfilePreviewType,
   ScreenType,
   SearchCategoryType,
-  Universities,
 } from '../../types';
 import {
   getRecentlySearchedCategories,
@@ -39,9 +38,9 @@ import {
 
 const SearchScreen: React.FC = () => {
   const {recentSearches} = useSelector((state: RootState) => state.taggUsers);
-  const {profile: {university = Universities.cornell} = {}} = useSelector(
-    (state: RootState) => state.user,
-  );
+  const {
+    profile: {university},
+  } = useSelector((state: RootState) => state.user);
   const [query, setQuery] = useState<string>('');
   const [results, setResults] = useState<Array<any> | undefined>(undefined);
   const [recents, setRecents] = useState<Array<ProfilePreviewType>>(
@@ -54,7 +53,7 @@ const SearchScreen: React.FC = () => {
   const top = Animated.useValue(-SCREEN_HEIGHT);
   const defaultButtons: SearchCategoryType[] = [21, 22, 23, 24].map((year) => ({
     id: -1,
-    name: `${university} '${year}`,
+    name: `${university.split(' ')[0]} '${year}`,
     category: university,
   }));
   const [keyboardVisible, setKeyboardVisible] = React.useState(
diff --git a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx
index 76889657..336e8b35 100644
--- a/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx
+++ b/src/screens/suggestedPeople/SuggestedPeopleScreen.tsx
@@ -4,9 +4,6 @@ import {FlatList, RefreshControl, StatusBar, ViewToken} from 'react-native';
 import {useDispatch, useSelector, useStore} from 'react-redux';
 import {Background, TabsGradient, TaggLoadingIndicator} from '../../components';
 import {SP_PAGE_SIZE} from '../../constants';
-import {MainStack} from '../../routes';
-import MainStackScreen from '../../routes/main/MainStackScreen';
-import SuggestedPeopleOnboardingStackScreen from '../../routes/suggestedPeopleOnboarding/SuggestedPeopleOnboardingStackScreen';
 import {getSuggestedPeople} from '../../services/SuggestedPeopleService';
 import {cancelFriendRequest, resetScreenType} from '../../store/actions';
 import {RootState} from '../../store/rootReducer';
@@ -22,15 +19,9 @@ import {
   getUserAsProfilePreviewType,
   handleAddFriend,
 } from '../../utils';
-import {SuggestedPeopleWelcomeScreen} from '../suggestedPeopleOnboarding';
 import {userXInStore} from './../../utils/';
 import SPBody from './SPBody';
 
-/**
- * Bare bones for suggested people consisting of:
- * * Image, title, name, username, add friend button [w/o functionality]
- */
-
 const SuggestedPeopleScreen: React.FC = () => {
   const navigation = useNavigation();
   const state: RootState = useStore().getState();
diff --git a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
index 378e69c5..e1bcb477 100644
--- a/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
+++ b/src/screens/suggestedPeopleOnboarding/SuggestedPeopleUploadPictureScreen.tsx
@@ -14,7 +14,7 @@ import ImagePicker from 'react-native-image-crop-picker';
 import {SafeAreaView} from 'react-native-safe-area-context';
 import {useDispatch, useSelector} from 'react-redux';
 import {MainStackParams} from 'src/routes';
-import {Universities} from '../../types';
+import {UniversityType} from '../../types';
 import FrontArrow from '../../assets/icons/front-arrow.svg';
 import {TaggSquareButton, UniversityIcon} from '../../components';
 import TaggLoadingIndicator from '../../components/common/TaggLoadingIndicator';
@@ -52,7 +52,7 @@ const SuggestedPeopleUploadPictureScreen: React.FC<SuggestedPeopleUploadPictureS
   const navigation = useNavigation();
   const {
     user: {userId: loggedInUserId},
-    profile: {university = Universities.brown},
+    profile: {university = UniversityType.brown},
   } = useSelector((state: RootState) => state.user);
 
   useEffect(() => {
diff --git a/src/types/types.ts b/src/types/types.ts
index 8ec3ab52..94fc966e 100644
--- a/src/types/types.ts
+++ b/src/types/types.ts
@@ -273,4 +273,4 @@ export type ContactType = {
 };
 
 export type UniversityBadgeType = 'Search' | 'Crest';
-export type BadgeDataType = Record<UniversityType, any>;
+export type BadgeDataType = Record<UniversityType, any[]>;
diff --git a/src/utils/common.ts b/src/utils/common.ts
index fdc6b875..4f31af8e 100644
--- a/src/utils/common.ts
+++ b/src/utils/common.ts
@@ -1,7 +1,7 @@
 import {
   ContactType,
   NotificationType,
-  Universities,
+  UniversityType,
   UniversityBadgeType,
 } from './../types/types';
 import moment from 'moment';
@@ -139,7 +139,7 @@ export const extractContacts = async () => {
 };
 
 export const getUniversityBadge = (
-  university: Universities,
+  university: UniversityType,
   type: UniversityBadgeType,
 ) => {
   switch (type) {
@@ -152,22 +152,22 @@ export const getUniversityBadge = (
   }
 };
 
-const _searchPageIcon = (university: Universities) => {
+const _searchPageIcon = (university: UniversityType) => {
   switch (university) {
-    case 'Cornell':
+    case UniversityType.Cornell:
       return require('../assets/universities/cornell-search.png');
-    case 'Brown':
+    case UniversityType.Brown:
       return require('../assets/images/bwbadges.png');
     default:
       return require('../assets/images/bwbadges.png');
   }
 };
 
-const _crestIcon = (university: Universities) => {
+const _crestIcon = (university: UniversityType) => {
   switch (university) {
-    case 'Cornell':
+    case UniversityType.Cornell:
       return require('../assets/universities/cornell.png');
-    case 'Brown':
+    case UniversityType.Brown:
       return require('../assets/universities/brown.png');
     default:
       return require('../assets/images/bwbadges.png');
diff --git a/src/utils/search.ts b/src/utils/search.ts
index aa9a7463..26f40b1b 100644
--- a/src/utils/search.ts
+++ b/src/utils/search.ts
@@ -1,12 +1,16 @@
 import AsyncStorage from '@react-native-community/async-storage';
 
 import {BADGE_DATA} from '../constants/badges';
-import {ProfilePreviewType, CategoryPreviewType, Universities} from '../types';
+import {
+  ProfilePreviewType,
+  CategoryPreviewType,
+  UniversityType,
+} from '../types';
 
 /*
  * Gets all possible search suggestions.
  */
-export const getSearchSuggestions = (university : Universities): string[] => {
+export const getSearchSuggestions = (university: UniversityType): string[] => {
   const suggestions: string[] = [];
   for (const category of BADGE_DATA[university]) {
     for (const interest of category.data) {
@@ -62,7 +66,9 @@ export const getRecentlySearchedUsers = async (): Promise<
 > => {
   try {
     const usersJSON = await AsyncStorage.getItem(recentlySearchedUsersKey);
-    if (usersJSON) return JSON.parse(usersJSON);
+    if (usersJSON) {
+      return JSON.parse(usersJSON);
+    }
   } catch (e) {
     console.log(e);
   }
@@ -124,7 +130,9 @@ export const getRecentlySearchedCategories = async (): Promise<
     const categoriesJSON = await AsyncStorage.getItem(
       '@recently_searched_categories',
     );
-    if (categoriesJSON) return JSON.parse(categoriesJSON);
+    if (categoriesJSON) {
+      return JSON.parse(categoriesJSON);
+    }
   } catch (e) {
     console.log(e);
   }
-- 
cgit v1.2.3-70-g09d2

