Newer
Older
import { ScrollView, View, BackHandler } from 'react-native'
import Hyperlink from 'react-native-hyperlink'
import { shared } from '../i18n/en/labels'
import settingsLabels from '../i18n/en/settings'
import styles,{secondaryColor} from '../styles'
import Button from './button'
import { saveLicenseFlag } from '../local-storage'
import replace from './helpers/replace-url-with-text'
export default function License({setLicense}) {
<Hyperlink linkStyle={styles.link} linkText={replace}>
<AppText style={styles.settingsSegmentTitle}>{labels.title}</AppText>
<AppText>{labels.text}</AppText>
</Hyperlink>
<Button
style={styles.licenseButton}
backgroundColor={'grey'}
onPress={() => BackHandler.exitApp()}
>
<Button
style={styles.licenseButton}
backgroundColor={secondaryColor}
onPress={async () => {
await saveLicenseFlag()
setLicense()
}}
>
{shared.ok}
</Button>
</View>
</ScrollView>
)
}