Merge branch '677-fix-license-screen-cut-out-on-top' into 'main'

Fix: Give some marginTop on very first License screen

Closes #677

See merge request bloodyhealth/drip!638
This commit is contained in:
bl00dymarie
2023-12-13 11:00:48 +00:00
3 changed files with 13 additions and 2 deletions
+9 -1
View File
@@ -1,18 +1,20 @@
import React from 'react'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import { StyleSheet } from 'react-native'
import AppPage from '../common/app-page'
import AppText from '../common/app-text'
import AppLink from '../common/AppLink'
import Segment from '../common/segment'
import { Spacing } from '../../styles'
const License = ({ children }) => {
const { t } = useTranslation(null, { keyPrefix: 'hamburgerMenu.license' })
const currentYear = new Date().getFullYear()
const link = 'https://www.gnu.org/licenses/gpl-3.0.html'
return (
<AppPage title={t('title')}>
<AppPage title={t('title')} contentContainerStyle={styles.contentContainer}>
<Segment last>
<AppText>{t('text', { currentYear })}</AppText>
<AppLink url={link}>{link}</AppLink>
@@ -26,4 +28,10 @@ License.propTypes = {
children: PropTypes.node,
}
const styles = StyleSheet.create({
contentContainer: {
marginTop: Spacing.large,
},
})
export default License
+1
View File
@@ -13,6 +13,7 @@
"start": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios --simulator=\"iPhone 8 Plus\"",
"ios14": "react-native run-ios --simulator=\"iPhone 14 Plus\"",
"log": "react-native log-android",
"test": "jest test && yarn lint",
"test-watch": "jest --watch test",
+3 -1
View File
@@ -16,7 +16,9 @@ exports[`License screen should match the snapshot 1`] = `
"backgroundColor": "#E9F2ED",
"flexGrow": 1,
},
undefined,
{
"marginTop": 42.857142857142854,
},
]
}
>