aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js
blob: 4965d7b4e51e36af5b31033f9a187c40fcd64349 (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
import React from 'react'
import PropTypes from 'prop-types'

const ConfirmPageContainerError = (props, context) => {
  const { errorMessage, errorKey } = props
  const error = errorKey ? context.t(errorKey) : errorMessage

  return (
    <div className="confirm-page-container-error">
      <img
        src="/images/alert-red.svg"
        className="confirm-page-container-error__icon"
      />
      <div className="confirm-page-container-error__text">
        { `ALERT: ${error}` }
      </div>
    </div>
  )
}

ConfirmPageContainerError.propTypes = {
  errorMessage: PropTypes.string,
  errorKey: PropTypes.string,
}

ConfirmPageContainerError.contextTypes = {
  t: PropTypes.func,
}

export default ConfirmPageContainerError