From 594de4668248bac9b744e6882329183c95ac339c Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Wed, 10 Mar 2021 18:15:26 -0500 Subject: Add utils, fix ordering of recent searches --- src/components/search/SearchResultCell.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/search/SearchResultCell.tsx') diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx index 5cba6d2f..f274bfb9 100644 --- a/src/components/search/SearchResultCell.tsx +++ b/src/components/search/SearchResultCell.tsx @@ -14,11 +14,11 @@ import { } from '../../types'; import {normalize, SCREEN_WIDTH} from '../../utils'; import { - addUserToRecentlyViewed, checkIfUserIsBlocked, defaultUserProfile, fetchUserX, userXInStore, + addUserToRecentlySearched, addCategoryToRecentlySearched, } from '../../utils/users'; @@ -74,7 +74,7 @@ const SearchResultsCell: React.FC = ({ return; } - addUserToRecentlyViewed({ + addUserToRecentlySearched({ id, first_name, last_name, -- cgit v1.2.3-70-g09d2 From 3c1e9ee07e6cc09cf9ac4d28fb9615e8e36ed14c Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 12 Mar 2021 11:24:43 -0800 Subject: Defined specific width --- src/components/search/SearchResultCell.tsx | 1 + src/components/search/SearchResultList.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/components/search/SearchResultCell.tsx') diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx index 5cba6d2f..6954ff8c 100644 --- a/src/components/search/SearchResultCell.tsx +++ b/src/components/search/SearchResultCell.tsx @@ -172,6 +172,7 @@ const styles = StyleSheet.create({ flexDirection: 'row', paddingHorizontal: 25, paddingVertical: 15, + width: SCREEN_WIDTH, }, imageContainer: { width: SCREEN_WIDTH * 0.112, diff --git a/src/components/search/SearchResultList.tsx b/src/components/search/SearchResultList.tsx index d8cf02d9..2a4d3746 100644 --- a/src/components/search/SearchResultList.tsx +++ b/src/components/search/SearchResultList.tsx @@ -51,7 +51,7 @@ const SearchResultList: React.FC = ({ {width: SCREEN_WIDTH}, keyboardVisible ? styles.keyboardOpen : {}, ]} - contentContainerStyle={{paddingBottom: SCREEN_HEIGHT * 0.1}} + contentContainerStyle={styles.sectionListContentContainer} sections={results} keyExtractor={(item, index) => item.id + index} renderItem={({section, item}) => { @@ -77,6 +77,10 @@ const styles = StyleSheet.create({ height: SCREEN_HEIGHT, paddingBottom: SCREEN_HEIGHT * 0.1, }, + sectionListContentContainer: { + paddingBottom: SCREEN_HEIGHT * 0.15, + width: SCREEN_WIDTH, + }, sectionHeaderStyle: { width: '100%', height: 0.5, -- cgit v1.2.3-70-g09d2