import React, { Component } from 'react'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import { View } from 'react-native'; import { Text, Icon } from 'react-native-elements'; import { BlueButton, SafeBlueArea, BlueCard } from '../../BlueComponents'; import { BitcoinUnit } from '../../models/bitcoinUnits'; import PropTypes from 'prop-types'; let loc = require('../../loc'); export default class Success extends Component { static navigationOptions = { header: null, }; constructor(props) { super(props); console.log('send/create constructor'); this.state = { amount: props.navigation.getParam('amount'), fee: props.navigation.getParam('fee'), }; } async componentDidMount() { console.log('send/create - componentDidMount'); ReactNativeHapticFeedback.trigger('notificationSuccess', false); } render() { return ( {this.state.amount} {' ' + BitcoinUnit.BTC} {loc.send.create.fee}: {loc.formatBalance(this.state.fee, BitcoinUnit.SATS)} { this.props.navigation.dismiss(); }} title={loc.send.success.done} /> ); } } Success.propTypes = { navigation: PropTypes.shape({ goBack: PropTypes.function, getParam: PropTypes.function, navigate: PropTypes.function, dismiss: PropTypes.function, state: PropTypes.shape({ params: PropTypes.shape({ amount: PropTypes.string, fee: PropTypes.number, }), }), }), };