aboutsummaryrefslogtreecommitdiff
path: root/src/screens/search/SearchScreen.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-08 15:48:55 -0500
committerIvan Chen <ivan@tagg.id>2021-03-08 15:48:55 -0500
commit7657657c2b8a28b96962ac4fa816bb1625a36e4b (patch)
treef5233751e98ee871534473330cf59b518c5c0009 /src/screens/search/SearchScreen.tsx
parent7e5f9c63360f8c4505bb414384e13f8c0f7576e4 (diff)
added support for badges
Diffstat (limited to 'src/screens/search/SearchScreen.tsx')
-rw-r--r--src/screens/search/SearchScreen.tsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx
index 223fc2b2..82a4c1ae 100644
--- a/src/screens/search/SearchScreen.tsx
+++ b/src/screens/search/SearchScreen.tsx
@@ -60,16 +60,18 @@ const SearchScreen: React.FC = () => {
`${SEARCH_ENDPOINT}?query=${query}`,
);
if (query.length > 2) {
- const categories = searchResults?.categories;
- const users = searchResults?.users;
const sanitizedResult = [
{
+ title: 'badges',
+ data: searchResults?.badges,
+ },
+ {
title: 'categories',
- data: categories,
+ data: searchResults?.categories,
},
{
title: 'users',
- data: users,
+ data: searchResults?.users,
},
];
setResults(sanitizedResult);
@@ -180,7 +182,7 @@ const styles = StyleSheet.create({
height: SCREEN_HEIGHT,
},
contentContainer: {
- height: SCREEN_HEIGHT * 0.9,
+ height: SCREEN_HEIGHT,
paddingTop: '2%',
paddingBottom: SCREEN_HEIGHT / 3,
paddingHorizontal: '3%',