diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-03-03 11:33:51 -0800 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-03-05 20:45:33 -0800 |
commit | b6bf444dabb105db84eb45b9d77575755d4f3b58 (patch) | |
tree | 25363d4d69c9db6eaf52f43df9dda7263d5dbbdf | |
parent | bb7794316b144ad1c6ea6d2e770be058af88ae5c (diff) |
Added categories to main search page
-rw-r--r-- | src/components/search/SearchCategories.tsx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/components/search/SearchCategories.tsx b/src/components/search/SearchCategories.tsx index 6df06007..e905c195 100644 --- a/src/components/search/SearchCategories.tsx +++ b/src/components/search/SearchCategories.tsx @@ -6,8 +6,24 @@ import LinearGradient from 'react-native-linear-gradient'; import {SCREEN_WIDTH} from '../../utils'; const SearchCategories: React.FC = () => { - // Get categories from backend - const categories = ['Brown 21', 'Brown 22', 'Brown 23', 'Brown 24']; + const categories = [ + { + id: 4, + name: "Brown '21", + }, + { + id: 5, + name: "Brown '22", + }, + { + id: 6, + name: "Brown '23", + }, + { + id: 7, + name: "Brown '24", + }, + ]; const navigation = useNavigation(); return ( <View style={styles.container}> @@ -21,12 +37,11 @@ const SearchCategories: React.FC = () => { <TouchableOpacity style={styles.buttonContainer} onPress={() => { - console.log('Sending: ', searchCategory); navigation.navigate('DiscoverUsers', { searchCategory, }); }}> - <Text style={styles.buttonText}>{searchCategory}</Text> + <Text style={styles.buttonText}>{searchCategory.name}</Text> </TouchableOpacity> </LinearGradient> ))} |