mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use localized messages for NotificationModal buttons (#7558)
This commit is contained in:
parent
5f89988671
commit
caefda5f47
@ -4,6 +4,10 @@ import {connect} from 'react-redux'
|
||||
import { hideModal } from '../../../store/actions'
|
||||
|
||||
class NotificationModal extends Component {
|
||||
static contextProps = {
|
||||
t: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
render () {
|
||||
const {
|
||||
header,
|
||||
@ -14,6 +18,8 @@ class NotificationModal extends Component {
|
||||
onConfirm,
|
||||
} = this.props
|
||||
|
||||
const { t } = this.context
|
||||
|
||||
const showButtons = showCancelButton || showConfirmButton
|
||||
|
||||
return (
|
||||
@ -35,7 +41,7 @@ class NotificationModal extends Component {
|
||||
className="btn-default notification-modal__buttons__btn"
|
||||
onClick={hideModal}
|
||||
>
|
||||
Cancel
|
||||
{t('cancel')}
|
||||
</div>
|
||||
)}
|
||||
{showConfirmButton && (
|
||||
@ -46,7 +52,7 @@ class NotificationModal extends Component {
|
||||
hideModal()
|
||||
}}
|
||||
>
|
||||
Confirm
|
||||
{t('confirm')}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user