From 3b7bf256d83e1898642c2aab9072ffbeec8cc032 Mon Sep 17 00:00:00 2001 From: Ashm Walia <40498934+ashmgarv@users.noreply.github.com> Date: Mon, 14 Dec 2020 16:02:09 -0800 Subject: [TMA - 426] Fix recent search + Add refresh control (#138) * Got rid of small lint errors before start * Final push * Final * disable scroll first try / logic * small change * Try to make the cover photo consistent with different screen sizes * Final change * added RefreshControl * removed scale effect * Fix misorientation of cover * remove more scale stuff * fix userIDs for different views * Mend refresh control * white bg Co-authored-by: hsalhab --- src/components/search/SearchResults.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/components/search/SearchResults.tsx') 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 = ({ 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 ( - + {results.map((profilePreview) => ( = ({ }; const styles = StyleSheet.create({ + containerSearch: {flexDirection: 'column', flexWrap: 'wrap'}, container: {flexDirection: 'row', flexWrap: 'wrap'}, result: { marginVertical: 10, -- cgit v1.2.3-70-g09d2