A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/app/components/error-message/error-message.component.js

30 lines
635 B

import React from 'react'
import PropTypes from 'prop-types'
const ErrorMessage = (props, context) => {
const { errorMessage, errorKey } = props
const error = errorKey ? context.t(errorKey) : errorMessage
return (
<div className="error-message">
<img
src="/images/alert-red.svg"
className="error-message__icon"
/>
<div className="error-message__text">
{ `ALERT: ${error}` }
</div>
</div>
)
}
ErrorMessage.propTypes = {
errorMessage: PropTypes.string,
errorKey: PropTypes.string,
}
ErrorMessage.contextTypes = {
t: PropTypes.func,
}
export default ErrorMessage