1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 21:00:13 +01:00
metamask-extension/ui/app/pages/send/send-header/send-header.component.js
Mark Stacey 624139a00f
Remove unused components (#7191)
* 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.
2019-09-18 18:41:36 -03:00

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')}
/>
)
}
}