Skip to content

Commit

Permalink
fix(earn-info): bottom to button padding on iPhone SE (#5535)
Browse files Browse the repository at this point in the history
### Description

Small layout fix PR for iPhone SE

| iPhone SE Before | iPhone SE After |
| ------ | ------ |
|
![](https://github.com/valora-inc/wallet/assets/26950305/1b149ad1-6b9e-4938-af9f-aae0ea78ba32
"iPhone SE Before") |
![](https://github.com/valora-inc/wallet/assets/26950305/e28bc462-ab96-4b16-89e9-c05d5754d5cb
"iPhone SE After") |

### Test plan

- [x] Tested locally on iOS
- [x] Tested locally on Android

### Related issues

- Fixes ACT-1192

### Backwards compatibility

Yes

### Network scalability

N/A

---------

Co-authored-by: Satish Ravi <satish.ravi@valoraapp.com>
  • Loading branch information
MuckT and satish-ravi committed Jun 12, 2024
1 parent afe7f47 commit 2966d86
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/earn/EarnInfoScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useHeaderHeight } from '@react-navigation/elements'
import { NativeStackScreenProps } from '@react-navigation/native-stack'
import React, { ReactElement } from 'react'
import { useTranslation } from 'react-i18next'
import { Platform, ScrollView, StyleSheet, Text, View } from 'react-native'
import { ScrollView, StyleSheet, Text, View } from 'react-native'
import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context'
import { EarnEvents } from 'src/analytics/Events'
import ValoraAnalytics from 'src/analytics/ValoraAnalytics'
Expand Down Expand Up @@ -61,15 +61,12 @@ export default function EarnInfoScreen({ route }: Props) {

const headerHeight = useHeaderHeight()
const { bottom } = useSafeAreaInsets()
const insetsStyle = Platform.OS === 'android' && {
const insetsStyle = {
paddingBottom: Math.max(bottom, Spacing.Regular16),
}

return (
<SafeAreaView
style={[styles.safeAreaContainer, { paddingTop: headerHeight }]}
edges={['bottom']}
>
<SafeAreaView style={[styles.safeAreaContainer, { paddingTop: headerHeight }]} edges={[]}>
<ScrollView>
<Text style={styles.title}>{t('earnFlow.earnInfo.title')}</Text>
<View style={styles.detailsContainer}>
Expand Down

0 comments on commit 2966d86

Please sign in to comment.