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';
|
2019-03-12 16:23:06 +00:00
|
|
|
import { SafeAreaView } from 'react-navigation';
|
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 I18n from '../i18n';
|
2019-03-12 16:23:06 +00:00
|
|
|
import StatusBar from '../containers/StatusBar';
|
2018-08-01 19:35:06 +00:00
|
|
|
|
2018-07-10 13:40:32 +00:00
|
|
|
@connect(state => ({
|
|
|
|
privacyPolicy: state.settings.Layout_Privacy_Policy
|
|
|
|
}))
|
2018-08-31 16:46:33 +00:00
|
|
|
/** @extends React.Component */
|
|
|
|
export default class PrivacyPolicyView extends LoggedView {
|
2019-03-12 16:23:06 +00:00
|
|
|
static navigationOptions = {
|
|
|
|
title: I18n.t('Privacy_Policy')
|
2018-11-14 21:42:03 +00:00
|
|
|
}
|
|
|
|
|
2017-11-13 13:32:46 +00:00
|
|
|
static propTypes = {
|
|
|
|
privacyPolicy: PropTypes.string
|
|
|
|
}
|
|
|
|
|
2018-08-31 16:46:33 +00:00
|
|
|
constructor(props) {
|
|
|
|
super('PrivacyPolicyView', props);
|
|
|
|
}
|
|
|
|
|
2017-11-13 13:32:46 +00:00
|
|
|
render() {
|
2018-09-25 19:28:42 +00:00
|
|
|
const { privacyPolicy } = this.props;
|
|
|
|
|
2017-11-13 13:32:46 +00:00
|
|
|
return (
|
2018-11-14 21:42:03 +00:00
|
|
|
<SafeAreaView style={styles.container} testID='privacy-view'>
|
2019-03-12 16:23:06 +00:00
|
|
|
<StatusBar />
|
2018-09-25 19:28:42 +00:00
|
|
|
<WebView originWhitelist={['*']} source={{ html: privacyPolicy, baseUrl: '' }} />
|
2018-08-01 19:35:06 +00:00
|
|
|
</SafeAreaView>
|
2017-11-13 13:32:46 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|