diff options
Diffstat (limited to 'src/screens/search')
| -rw-r--r-- | src/screens/search/SearchScreen.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
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( |
