diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-05 16:14:15 -0500 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-03-05 16:14:15 -0500 |
commit | 7cc6df961f99d5828f6cbe39c7509e17bae7d93c (patch) | |
tree | 50c5b55c5acbe784f5f54e9861f71652ff709804 /src/components/search/RecentSearches.tsx | |
parent | 79396f899fe25f611d790d918e8ae4275a61e43c (diff) |
fixed padding issue
Diffstat (limited to 'src/components/search/RecentSearches.tsx')
-rw-r--r-- | src/components/search/RecentSearches.tsx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/search/RecentSearches.tsx b/src/components/search/RecentSearches.tsx index 3925d084..6fb9fca9 100644 --- a/src/components/search/RecentSearches.tsx +++ b/src/components/search/RecentSearches.tsx @@ -5,10 +5,12 @@ import { TouchableOpacity, StyleSheet, TouchableOpacityProps, + ScrollView, } from 'react-native'; import {PreviewType, ProfilePreviewType, ScreenType} from '../../types'; import {TAGG_LIGHT_BLUE} from '../../constants'; import SearchResults from './SearchResults'; +import {SCREEN_HEIGHT} from '../../utils'; interface RecentSearchesProps extends TouchableOpacityProps { sectionTitle: PreviewType; @@ -21,7 +23,9 @@ interface RecentSearchesProps extends TouchableOpacityProps { */ const RecentSearches: React.FC<RecentSearchesProps> = (props) => { return ( - <View style={styles.mainContainer}> + <ScrollView + style={styles.mainContainer} + contentContainerStyle={{paddingBottom: SCREEN_HEIGHT * 0.1}}> <View style={styles.container}> <Text style={styles.title}>{props.sectionTitle}</Text> {props.sectionButtonTitle && ( @@ -35,14 +39,14 @@ const RecentSearches: React.FC<RecentSearchesProps> = (props) => { previewType={props.sectionTitle} screenType={props.screenType} /> - </View> + </ScrollView> ); }; const styles = StyleSheet.create({ mainContainer: { marginLeft: '3%', - padding : 20, + padding: 20, }, container: { flexDirection: 'row', |