diff options
| author | Ivan Chen <ivan@tagg.id> | 2021-03-08 21:26:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-08 21:26:56 -0500 |
| commit | 74231a7496d9dc6435d01c78588d32eb1e558d7e (patch) | |
| tree | dfbc23797b4756c8be2b5159a07c98a4c8f75838 /src/components/search/SearchResults.tsx | |
| parent | 5298bb3a1620f6906af5041bfe15d1ac7b6325d9 (diff) | |
| parent | ce4b25405b1a17ddf80211d903ce02b992422323 (diff) | |
Merge pull request #285 from leonyjiang/hotfix-hide-search-cancel
[Hotfix] Hide Search Bar Cancel Button
Diffstat (limited to 'src/components/search/SearchResults.tsx')
| -rw-r--r-- | src/components/search/SearchResults.tsx | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index 798d3251..fbeae1d8 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -5,7 +5,6 @@ import { ScreenType, CategoryPreviewType, } from '../../types'; -import ProfilePreview from '../profile/ProfilePreview'; import {StyleSheet, View} from 'react-native'; import SearchResultsCell from './SearchResultCell'; import {useSelector} from 'react-redux'; @@ -16,30 +15,14 @@ interface SearchResultsProps { screenType: ScreenType; categories: CategoryPreviewType[]; } -const SearchResults: React.FC<SearchResultsProps> = ({ - results, - previewType, - screenType, - categories, -}) => { +const SearchResults: React.FC<SearchResultsProps> = ({results, categories}) => { /** * Added the following swicth case to make Results on Search and Recents screen a list * Flex is love */ const {user: loggedInUser} = useSelector((state: RootState) => state.user); - let containerStyle; - switch (previewType) { - case 'Search': - containerStyle = styles.containerSearch; - break; - case 'Recent': - containerStyle = styles.containerSearch; - break; - default: - containerStyle = styles.container; - } return ( - <View style={containerStyle}> + <View> {categories.map((category: CategoryPreviewType) => ( <SearchResultsCell key={category.name} @@ -58,15 +41,4 @@ const SearchResults: React.FC<SearchResultsProps> = ({ ); }; -const styles = StyleSheet.create({ - containerSearch: { - flexDirection: 'column', - flexWrap: 'wrap', - }, - container: { - flexDirection: 'row', - flexWrap: 'wrap', - }, -}); - export default SearchResults; |
