Add MailerStatusNotice
This commit is contained in:
committed by
M. Shull
parent
0868751703
commit
bae579e7be
19
assets/js/src/notices/mailer_status_notice.jsx
Normal file
19
assets/js/src/notices/mailer_status_notice.jsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
|
import Notice from 'notices/notice.jsx';
|
||||||
|
|
||||||
|
const MailerStatusNotice = ({ error }) => {
|
||||||
|
if (!error || error.operation !== 'authorization') return null;
|
||||||
|
return <Notice type="error" timeout={false}><p>{error.error_message}</p></Notice>;
|
||||||
|
};
|
||||||
|
MailerStatusNotice.propTypes = {
|
||||||
|
error: PropTypes.shape({
|
||||||
|
operation: PropTypes.string,
|
||||||
|
error_message: PropTypes.string,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
MailerStatusNotice.defaultProps = {
|
||||||
|
error: null,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MailerStatusNotice;
|
Reference in New Issue
Block a user