aboutsummaryrefslogtreecommitdiff
path: root/src/components/search
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/search')
-rw-r--r--src/components/search/SearchResults.tsx18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx
index 001c7968..9d95593a 100644
--- a/src/components/search/SearchResults.tsx
+++ b/src/components/search/SearchResults.tsx
@@ -12,8 +12,23 @@ const SearchResults: React.FC<SearchResultsProps> = ({
previewType,
screenType,
}) => {
+ /**
+ * Added the following swicth case to make Results on Search and Recents screen a list
+ * Flex is love
+ */
+ var containerStyle;
+ switch (previewType) {
+ case 'Search':
+ containerStyle = styles.containerSearch;
+ break;
+ case 'Recent':
+ containerStyle = styles.containerSearch;
+ break;
+ default:
+ containerStyle = styles.container;
+ }
return (
- <View style={styles.container}>
+ <View style={containerStyle}>
{results.map((profilePreview) => (
<ProfilePreview
style={styles.result}
@@ -28,6 +43,7 @@ const SearchResults: React.FC<SearchResultsProps> = ({
};
const styles = StyleSheet.create({
+ containerSearch: {flexDirection: 'column', flexWrap: 'wrap'},
container: {flexDirection: 'row', flexWrap: 'wrap'},
result: {
marginVertical: 10,