aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Jiang <35908040+leonyjiang@users.noreply.github.com>2021-03-08 21:08:40 -0500
committerLeon Jiang <35908040+leonyjiang@users.noreply.github.com>2021-03-08 21:08:40 -0500
commitce4b25405b1a17ddf80211d903ce02b992422323 (patch)
tree4bc68c94f237ac0046eec9cd1bc138a9f9900580
parentc6c0370bf1ddf052fbb56d32b9e21097950b8b16 (diff)
Fix other styles screwed up during merging
-rw-r--r--src/components/search/SearchResultCell.tsx1
-rw-r--r--src/components/search/SearchResults.tsx33
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;