diff options
-rw-r--r-- | src/components/search/SearchResultCell.tsx | 1 | ||||
-rw-r--r-- | src/components/search/SearchResults.tsx | 33 |
2 files changed, 2 insertions, 32 deletions
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx index 5e6bb026..e0351d96 100644 --- a/src/components/search/SearchResultCell.tsx +++ b/src/components/search/SearchResultCell.tsx @@ -169,7 +169,6 @@ const styles = StyleSheet.create({ flexDirection: 'row', paddingHorizontal: 25, paddingVertical: 15, - backgroundColor: 'pink', }, imageContainer: { width: SCREEN_WIDTH * 0.112, diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx index f9de8927..fbeae1d8 100644 --- a/src/components/search/SearchResults.tsx +++ b/src/components/search/SearchResults.tsx @@ -5,42 +5,24 @@ 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'; import {RootState} from 'src/store/rootReducer'; -import {SCREEN_WIDTH} from '../../utils'; interface SearchResultsProps { results: ProfilePreviewType[]; previewType: PreviewType; 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} @@ -59,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; |