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:
@@ -1,18 +1,20 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
|
import { StyleSheet } from 'react-native'
|
||||||
|
|
||||||
import AppPage from '../common/app-page'
|
import AppPage from '../common/app-page'
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
import AppLink from '../common/AppLink'
|
import AppLink from '../common/AppLink'
|
||||||
import Segment from '../common/segment'
|
import Segment from '../common/segment'
|
||||||
|
import { Spacing } from '../../styles'
|
||||||
|
|
||||||
const License = ({ children }) => {
|
const License = ({ children }) => {
|
||||||
const { t } = useTranslation(null, { keyPrefix: 'hamburgerMenu.license' })
|
const { t } = useTranslation(null, { keyPrefix: 'hamburgerMenu.license' })
|
||||||
const currentYear = new Date().getFullYear()
|
const currentYear = new Date().getFullYear()
|
||||||
const link = 'https://www.gnu.org/licenses/gpl-3.0.html'
|
const link = 'https://www.gnu.org/licenses/gpl-3.0.html'
|
||||||
return (
|
return (
|
||||||
<AppPage title={t('title')}>
|
<AppPage title={t('title')} contentContainerStyle={styles.contentContainer}>
|
||||||
<Segment last>
|
<Segment last>
|
||||||
<AppText>{t('text', { currentYear })}</AppText>
|
<AppText>{t('text', { currentYear })}</AppText>
|
||||||
<AppLink url={link}>{link}</AppLink>
|
<AppLink url={link}>{link}</AppLink>
|
||||||
@@ -26,4 +28,10 @@ License.propTypes = {
|
|||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
contentContainer: {
|
||||||
|
marginTop: Spacing.large,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
export default License
|
export default License
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"start": "react-native start",
|
"start": "react-native start",
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
"ios": "react-native run-ios --simulator=\"iPhone 8 Plus\"",
|
"ios": "react-native run-ios --simulator=\"iPhone 8 Plus\"",
|
||||||
|
"ios14": "react-native run-ios --simulator=\"iPhone 14 Plus\"",
|
||||||
"log": "react-native log-android",
|
"log": "react-native log-android",
|
||||||
"test": "jest test && yarn lint",
|
"test": "jest test && yarn lint",
|
||||||
"test-watch": "jest --watch test",
|
"test-watch": "jest --watch test",
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ exports[`License screen should match the snapshot 1`] = `
|
|||||||
"backgroundColor": "#E9F2ED",
|
"backgroundColor": "#E9F2ED",
|
||||||
"flexGrow": 1,
|
"flexGrow": 1,
|
||||||
},
|
},
|
||||||
undefined,
|
{
|
||||||
|
"marginTop": 42.857142857142854,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user