Rocket.Chat.ReactNative/app/views/PrivacyPolicyView.js

40 lines
957 B
JavaScript
Raw Normal View History

import React from 'react';
import PropTypes from 'prop-types';
import { WebView } from 'react-native';
import { connect } from 'react-redux';
2019-03-12 16:23:06 +00:00
import { SafeAreaView } from 'react-navigation';
import styles from './Styles';
import LoggedView from './View';
import I18n from '../i18n';
2019-03-12 16:23:06 +00:00
import StatusBar from '../containers/StatusBar';
@connect(state => ({
privacyPolicy: state.settings.Layout_Privacy_Policy
}))
/** @extends React.Component */
export default class PrivacyPolicyView extends LoggedView {
2019-03-12 16:23:06 +00:00
static navigationOptions = {
title: I18n.t('Privacy_Policy')
}
static propTypes = {
privacyPolicy: PropTypes.string
}
constructor(props) {
super('PrivacyPolicyView', props);
}
render() {
const { privacyPolicy } = this.props;
return (
<SafeAreaView style={styles.container} testID='privacy-view'>
2019-03-12 16:23:06 +00:00
<StatusBar />
<WebView originWhitelist={['*']} source={{ html: privacyPolicy, baseUrl: '' }} />
</SafeAreaView>
);
}
}