import React, { Component } from "react"; import { SafeAreaView, View, Text, StyleSheet, TouchableOpacity, Clipboard, ToastAndroid, Alert } from "react-native"; import LinearGradient from "react-native-linear-gradient"; import { BackgroundImage } from "../../components/BackgroundImage"; import AntdIcon from 'react-native-vector-icons/AntDesign' import Toast from "react-native-toast-message"; import { t } from "../../utils/i18n"; class PasswordCode extends Component { constructor(props) { super(props); this.state = { password: this.props.navigation.getParam('password', null) } } handleCopy = () => { Toast.show({ type: 'success', text1: 'Copy success!', }); Clipboard.setString(this.state.password) } render () { return ( {t('new_password')} {t('copy_pw')} {t('for_login')} {this.state.password} {t('back_to')} this.props.navigation.navigate('Login')}> {t('login')} ) } } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', padding: 40 }, code_form: { backgroundColor: 'rgba(0,0,0,0)', borderColor: 'white', borderRadius: 30, borderWidth: 1, width: '100%', paddingVertical: 10, paddingHorizontal: 15, flexDirection: 'row', alignItems: 'center' }, fontPromtBold: { fontFamily: 'Prompt-Bold' } }) export default PasswordCode;