blob: 0d75dbdae39f7c1ec7dc616f1e173911b768574c (
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
|
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import PageContainerHeader from '../../page-container/page-container-header'
import { DEFAULT_ROUTE } from '../../../routes'
export default class SendHeader extends Component {
static propTypes = {
clearSend: PropTypes.func,
history: PropTypes.object,
isToken: PropTypes.bool,
};
onClose () {
this.props.clearSend()
this.props.history.push(DEFAULT_ROUTE)
}
render () {
return (
<PageContainerHeader
onClose={() => this.onClose()}
subtitle={this.context.t('onlySendToEtherAddress')}
title={this.props.isToken ? this.context.t('sendTokens') : this.context.t('sendETH')}
/>
)
}
}
SendHeader.contextTypes = {
t: PropTypes.func,
}
|