blob: 0a98eb1a114e6957d5132d90531702e05e900560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
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>
)
}
}
|