aboutsummaryrefslogtreecommitdiff
path: root/src/components/search/SearchResultCell.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-08 20:53:03 -0500
committerGitHub <noreply@github.com>2021-03-08 20:53:03 -0500
commit5298bb3a1620f6906af5041bfe15d1ac7b6325d9 (patch)
treebb0df686ffdb8afe16c242532c6dcfd7038c7018 /src/components/search/SearchResultCell.tsx
parentd77f43663fbe409b011b5509bcbff3d07f8ded55 (diff)
parent64a454efe603455f17a401a9d2c75e72f22c1f4f (diff)
Merge pull request #287 from IvanIFChen/tma684-search-for-badges
[TMA-684] Support to Search Badges
Diffstat (limited to 'src/components/search/SearchResultCell.tsx')
-rw-r--r--src/components/search/SearchResultCell.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx
index e0351d96..5cba6d2f 100644
--- a/src/components/search/SearchResultCell.tsx
+++ b/src/components/search/SearchResultCell.tsx
@@ -23,11 +23,13 @@ import {
} from '../../utils/users';
interface SearchResults {
+ type: 'badges' | 'categories' | 'users';
profileData: ProfilePreviewType;
loggedInUser: UserType;
}
const SearchResultsCell: React.FC<SearchResults> = ({
+ type,
profileData: {
id,
name,
@@ -112,6 +114,7 @@ const SearchResultsCell: React.FC<SearchResults> = ({
const categoryObj: CategoryPreviewType = {name, category};
addCategoryToRecentlySearched(categoryObj);
navigation.navigate('DiscoverUsers', {
+ type,
searchCategory: {id, name},
});
};