You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
45 lines
1.0 KiB
import React, { PureComponent } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import Modal from '../../modal'
|
|
|
|
export default class TransactionConfirmed extends PureComponent {
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
}
|
|
|
|
static propTypes = {
|
|
onSubmit: PropTypes.func,
|
|
hideModal: PropTypes.func,
|
|
}
|
|
|
|
handleSubmit = () => {
|
|
const { hideModal, onSubmit } = this.props
|
|
|
|
hideModal()
|
|
|
|
if (onSubmit && typeof onSubmit === 'function') {
|
|
onSubmit()
|
|
}
|
|
}
|
|
|
|
render () {
|
|
const { t } = this.context
|
|
|
|
return (
|
|
<Modal
|
|
onSubmit={this.handleSubmit}
|
|
submitText={t('ok')}
|
|
>
|
|
<div className="transaction-confirmed__content">
|
|
<img src="images/check-icon.svg" />
|
|
<div className="transaction-confirmed__title">
|
|
{ `${t('confirmed')}!` }
|
|
</div>
|
|
<div className="transaction-confirmed__description">
|
|
{ t('initialTransactionConfirmed') }
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
)
|
|
}
|
|
}
|
|
|