mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-27 21:00:13 +01:00
624139a00f
* Remove unused sendWarnings The send warnings state and associated component is no longer used anywhere. * Remove unused subtitleParams The `subtitleParams` SendHeader prop was being ignored. It has been removed, along with associated selectors and tests.
35 lines
809 B
JavaScript
35 lines
809 B
JavaScript
import React, { Component } from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import PageContainerHeader from '../../../components/ui/page-container/page-container-header'
|
|
import { DEFAULT_ROUTE } from '../../../helpers/constants/routes'
|
|
|
|
export default class SendHeader extends Component {
|
|
|
|
static propTypes = {
|
|
clearSend: PropTypes.func,
|
|
history: PropTypes.object,
|
|
titleKey: PropTypes.string,
|
|
};
|
|
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
};
|
|
|
|
onClose () {
|
|
this.props.clearSend()
|
|
this.props.history.push(DEFAULT_ROUTE)
|
|
}
|
|
|
|
render () {
|
|
return (
|
|
<PageContainerHeader
|
|
className="send__header"
|
|
onClose={() => this.onClose()}
|
|
title={this.context.t(this.props.titleKey)}
|
|
headerCloseText={this.context.t('cancel')}
|
|
/>
|
|
)
|
|
}
|
|
|
|
}
|