import React, { Component } from 'react'; import { View, ScrollView, TouchableOpacity, Linking } from 'react-native'; import Text from '../../components/Text'; import { Badge } from 'native-base' import { WebView } from 'react-native-webview'; import { t } from '../../utils/i18n' import {connect} from "react-redux"; import {bindActionCreators} from "redux"; import {appCleanUser} from "../../redux/app/action"; import I18n from "i18n-js"; class TermsAndCondition extends Component { constructor(props) { super(props); this.state = { currentLocale: 'th' }; } componentDidMount(): void { this.setState({ currentLocale : I18n.currentLocale() }) } render() { return ( {/* TermsAndCondition */} { console.log('onNavigationStateChange >>>>>> ',event); /*if (event.url.startsWith("http")) { this.webview.stopLoading(); this.webview.goBack(); Linking.openURL(event.url); }*/ }} /> { this.props. appCleanUser(); this.props.navigation.goBack() }}> {t('not_agree')} { this.props.navigation.navigate('Register') }}> {t('agree')} ); } } const clearUser = dispatch => bindActionCreators({appCleanUser}, dispatch); export default connect(null, clearUser)(TermsAndCondition);