diff --git a/app/containers/routes/PublicRoutes.js b/app/containers/routes/PublicRoutes.js index 92781c00..41c26717 100644 --- a/app/containers/routes/PublicRoutes.js +++ b/app/containers/routes/PublicRoutes.js @@ -7,6 +7,9 @@ import ListServerView from '../../views/ListServerView'; import NewServerView from '../../views/NewServerView'; import LoginView from '../../views/LoginView'; import RegisterView from '../../views/RegisterView'; + +import TermsServiceView from '../../views/TermsServiceView'; +import PrivacyPolicyView from '../../views/PrivacyPolicyView'; import ForgotPasswordView from '../../views/ForgotPasswordView'; const PublicRoutes = StackNavigator( @@ -45,6 +48,18 @@ const PublicRoutes = StackNavigator( title: 'Register' } }, + TermsService: { + screen: TermsServiceView, + navigationOptions: { + title: 'Terms of service' + } + }, + PrivacyPolicy: { + screen: PrivacyPolicyView, + navigationOptions: { + title: 'Privacy policy' + } + }, ForgotPassword: { screen: ForgotPasswordView, navigationOptions: { diff --git a/app/views/LoginView.js b/app/views/LoginView.js index f27741bc..4ee33cae 100644 --- a/app/views/LoginView.js +++ b/app/views/LoginView.js @@ -49,6 +49,14 @@ class LoginView extends React.Component { this.props.navigation.navigate('Register'); } + termsService = () => { + this.props.navigation.navigate('TermsService'); + } + + privacyPolicy = () => { + this.props.navigation.navigate('PrivacyPolicy'); + } + forgotPassword = () => { this.props.navigation.navigate('ForgotPassword'); } @@ -114,6 +122,13 @@ class LoginView extends React.Component { REGISTER + + TERMS OF SERVICE + + + + PRIVACY POLICY + FORGOT MY PASSWORD diff --git a/app/views/PrivacyPolicyView.js b/app/views/PrivacyPolicyView.js new file mode 100644 index 00000000..e4f96abc --- /dev/null +++ b/app/views/PrivacyPolicyView.js @@ -0,0 +1,28 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { WebView } from 'react-native'; +import { connect } from 'react-redux'; + +class PrivacyPolicyView extends React.Component { + static propTypes = { + privacyPolicy: PropTypes.string + } + + static navigationOptions = () => ({ + title: 'Terms of service' + }); + + render() { + return ( + + ); + } +} + +function mapStateToProps(state) { + return { + privacyPolicy: state.settings.Layout_Privacy_Policy + }; +} + +export default connect(mapStateToProps)(PrivacyPolicyView); diff --git a/app/views/TermsServiceView.js b/app/views/TermsServiceView.js new file mode 100644 index 00000000..b56abca0 --- /dev/null +++ b/app/views/TermsServiceView.js @@ -0,0 +1,28 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { WebView } from 'react-native'; +import { connect } from 'react-redux'; + +class TermsServiceView extends React.Component { + static propTypes = { + termsService: PropTypes.string + } + + static navigationOptions = () => ({ + title: 'Terms of service' + }); + + render() { + return ( + + ); + } +} + +function mapStateToProps(state) { + return { + termsService: state.settings.Layout_Terms_of_Service + }; +} + +export default connect(mapStateToProps)(TermsServiceView);