aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js
blob: 70ebdeb204f86a4878a6e37fd9a8d287c1df2614 (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
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"
      />
      { `ALERT: ${error}` }
    </div>
  )
}

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

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

export default ConfirmPageContainerError