aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-03-12 14:31:07 -0500
committerGitHub <noreply@github.com>2021-03-12 14:31:07 -0500
commitf810a63d3cd0be2e9fefda747189cd0b3f8ceb86 (patch)
tree834836f0c9690851badac779a905b76b59b607ea /src
parentaa601cd9b35778408b7efdf1eaeca7c0a38d092f (diff)
parent3c1e9ee07e6cc09cf9ac4d28fb9615e8e36ed14c (diff)
Merge pull request #295 from shravyaramesh/search-results-style-bug
[bugfix] Search results style bug
Diffstat (limited to 'src')
-rw-r--r--src/components/search/SearchResultCell.tsx1
-rw-r--r--src/components/search/SearchResultList.tsx6
-rw-r--r--src/screens/suggestedPeople/SPBody.tsx2
3 files changed, 7 insertions, 2 deletions
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<SearchResultsProps> = ({
{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,
diff --git a/src/screens/suggestedPeople/SPBody.tsx b/src/screens/suggestedPeople/SPBody.tsx
index 6572dc55..bba137c0 100644
--- a/src/screens/suggestedPeople/SPBody.tsx
+++ b/src/screens/suggestedPeople/SPBody.tsx
@@ -50,7 +50,7 @@ const SPBody: React.FC<SPBodyProps> = ({
let array = [];
useEffect(() => {
const findBadgeIcons = (badge: UniversityBadge) => {
- DATA.forEach((item) => {
+ DATA?.forEach((item) => {
if (item.title === badge.category) {
item.data.forEach((object) => {
if (object.badgeName === badge.name) {