diff options
| author | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-24 16:09:45 -0700 |
|---|---|---|
| committer | ankit-thanekar007 <ankit.thanekar007@gmail.com> | 2021-03-24 16:11:32 -0700 |
| commit | 8ce46790a8d12df6738d8ac17462ba57e2b0e6b9 (patch) | |
| tree | f58987fd342e466403bdbd00146a98189bd4fc4f /src/screens/search | |
| parent | 592cb776068b2f1daf90755e04b33cdeba2bb947 (diff) | |
Cornell Changes
Diffstat (limited to 'src/screens/search')
| -rw-r--r-- | src/screens/search/SearchScreen.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
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', |
