aboutsummaryrefslogtreecommitdiff
path: root/src/screens/search
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/search')
-rw-r--r--src/screens/search/SearchScreen.tsx8
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',