1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 11:46:13 +02:00
metamask-extension/ui/app/pages/send/send-header/send-header.component.js

34 lines
762 B
JavaScript
Raw Normal View History

2018-04-07 00:29:51 +02:00
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'
2018-04-07 00:29:51 +02:00
export default class SendHeader extends Component {
static propTypes = {
clearSend: PropTypes.func,
2018-04-30 17:30:51 +02:00
history: PropTypes.object,
titleKey: PropTypes.string,
subtitleParams: PropTypes.array,
2018-04-07 00:29:51 +02:00
};
static contextTypes = {
t: PropTypes.func,
};
onClose () {
this.props.clearSend()
this.props.history.push(DEFAULT_ROUTE)
}
2018-04-07 00:29:51 +02:00
render () {
2018-04-07 00:29:51 +02:00
return (
<PageContainerHeader
onClose={() => this.onClose()}
title={this.context.t(this.props.titleKey)}
2018-04-07 00:29:51 +02:00
/>
)
2018-04-07 00:29:51 +02:00
}
}