2017-11-13 13:32:46 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2018-10-23 21:39:48 +00:00
|
|
|
import { WebView } from 'react-native';
|
2017-11-13 13:32:46 +00:00
|
|
|
import { connect } from 'react-redux';
|
2018-10-23 21:39:48 +00:00
|
|
|
import SafeAreaView from 'react-native-safe-area-view';
|
2017-11-13 13:32:46 +00:00
|
|
|
|
2018-08-01 19:35:06 +00:00
|
|
|
import styles from './Styles';
|
2018-08-31 16:46:33 +00:00
|
|
|
import LoggedView from './View';
|
2018-11-14 21:42:03 +00:00
|
|
|
import { DARK_HEADER } from '../constants/headerOptions';
|
|
|
|
import I18n from '../i18n';
|
2018-08-01 19:35:06 +00:00
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
@connect(state => ({
|
|
|
|
termsService: state.settings.Layout_Terms_of_Service
|
|
|
|
}))
|
2018-08-31 16:46:33 +00:00
|
|
|
/** @extends React.Component */
|
|
|
|
export default class TermsServiceView extends LoggedView {
|
2018-11-14 21:42:03 +00:00
|
|
|
static options() {
|
|
|
|
return {
|
|
|
|
...DARK_HEADER,
|
|
|
|
topBar: {
|
|
|
|
...DARK_HEADER.topBar,
|
|
|
|
title: {
|
|
|
|
...DARK_HEADER.topBar.title,
|
|
|
|
text: I18n.t('Terms_of_Service')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2017-11-13 13:32:46 +00:00
|
|
|
static propTypes = {
|
|
|
|
termsService: PropTypes.string
|
|
|
|
}
|
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
constructor(props) {
|
|
|
|
super('TermsServiceView', props);
|
|
|
|
}
|
|
|
|
|
2017-11-13 13:32:46 +00:00
|
|
|
render() {
|
2018-09-25 19:28:42 +00:00
|
|
|
const { termsService } = this.props;
|
2017-11-13 13:32:46 +00:00
|
|
|
return (
|
2018-11-14 21:42:03 +00:00
|
|
|
<SafeAreaView style={styles.container} testID='terms-view'>
|
2018-09-25 19:28:42 +00:00
|
|
|
<WebView originWhitelist={['*']} source={{ html: termsService, baseUrl: '' }} />
|
2018-08-01 19:35:06 +00:00
|
|
|
</SafeAreaView>
|
2017-11-13 13:32:46 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|