Chore: Implement review feedback

This commit is contained in:
BloodyMarie
2022-03-06 00:03:25 +01:00
committed by Lisa Hillebrand
parent 03b359019e
commit d1ac12d165
3 changed files with 38 additions and 33 deletions
+20
View File
@@ -0,0 +1,20 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
const ButtonRow = ({ children }) => {
return <View style={styles.container}>{children}</View>
}
ButtonRow.propTypes = {
children: PropTypes.node.isRequired,
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'space-between',
},
})
export default ButtonRow
+4 -4
View File
@@ -2,12 +2,12 @@ import React from 'react'
import PropTypes from 'prop-types' import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native' import { StyleSheet, View } from 'react-native'
const ButtonToButton = ({ children }) => { const ButtonRow = ({ children }) => {
return <View style={styles.container}>{children}</View> return <View style={styles.container}>{children}</View>
} }
ButtonToButton.propTypes = { ButtonRow.propTypes = {
children: PropTypes.node, children: PropTypes.node.isRequired,
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
@@ -17,4 +17,4 @@ const styles = StyleSheet.create({
}, },
}) })
export default ButtonToButton export default ButtonRow
+14 -29
View File
@@ -5,7 +5,7 @@ import AppPage from '../common/app-page'
import AppText from '../common/app-text' import AppText from '../common/app-text'
import Segment from '../common/segment' import Segment from '../common/segment'
import Button from '../common/button' import Button from '../common/button'
import ButtonToButton from '../common/button-to-button' import ButtonRow from '../common/button-row'
import labels from '../../i18n/en/settings' import labels from '../../i18n/en/settings'
import links from '../../i18n/en/links' import links from '../../i18n/en/links'
@@ -15,29 +15,18 @@ const AboutSection = () => {
<AppPage title={labels.aboutSection.title}> <AppPage title={labels.aboutSection.title}>
<Segment> <Segment>
<AppText>{labels.aboutSection.text}</AppText> <AppText>{labels.aboutSection.text}</AppText>
<ButtonToButton> <ButtonRow>
<Button {[links.email, links.gitlab, links.website].map((link) => (
isCTA <Button
isSmall={true} key={link.url}
onPress={() => Linking.openURL(links.email.url)} isCTA
> isSmall
{links.email.text} onPress={() => Linking.openURL(link['url'])}
</Button> >
<Button {link['text']}
isCTA </Button>
isSmall={true} ))}
onPress={() => Linking.openURL(links.gitlab.url)} </ButtonRow>
>
{links.gitlab.text}
</Button>
<Button
isCTA
isSmall={true}
onPress={() => Linking.openURL(links.website.url)}
>
{links.website.text}
</Button>
</ButtonToButton>
</Segment> </Segment>
<Segment title={labels.philosophy.title}> <Segment title={labels.philosophy.title}>
<AppText>{labels.philosophy.text}</AppText> <AppText>{labels.philosophy.text}</AppText>
@@ -47,11 +36,7 @@ const AboutSection = () => {
</Segment> </Segment>
<Segment title={labels.donate.title}> <Segment title={labels.donate.title}>
<AppText>{labels.donate.note}</AppText> <AppText>{labels.donate.note}</AppText>
<Button <Button isCTA isSmall onPress={() => Linking.openURL(links.donate.url)}>
isCTA
isSmall={true}
onPress={() => Linking.openURL(links.donate.url)}
>
{links.donate.text} {links.donate.text}
</Button> </Button>
</Segment> </Segment>