Extract link component and parse all app text for links

This commit is contained in:
Julia Friesel
2019-02-02 11:55:03 +01:00
parent 87301da648
commit 0878654e82
8 changed files with 41 additions and 45 deletions
+2 -6
View File
@@ -1,20 +1,16 @@
import React, { Component } from 'react'
import { View, ScrollView } from 'react-native'
import Hyperlink from 'react-native-hyperlink'
import AppText from '../app-text'
import styles from '../../styles/index'
import labels from '../../i18n/en/settings'
import replace from '../helpers/replace-url-with-text'
export default class License extends Component {
render() {
return (
<ScrollView>
<View style={styles.settingsSegment}>
<Hyperlink linkStyle={styles.link} linkText={replace} linkDefault>
<AppText style={styles.settingsSegmentTitle}>{`${labels.license.title} `}</AppText>
<AppText>{`${labels.license.text} `}</AppText>
</Hyperlink>
<AppText style={styles.settingsSegmentTitle}>{`${labels.license.title} `}</AppText>
<AppText>{`${labels.license.text} `}</AppText>
</View>
</ScrollView>
)