2016-05-02 13:36:25 +05:30
|
|
|
import React, { PropTypes } from 'react';
|
2016-02-13 20:58:47 +05:30
|
|
|
|
2016-05-02 13:34:23 +05:30
|
|
|
import errorsDict from 'services/errorsDict';
|
2016-02-13 20:58:47 +05:30
|
|
|
import { PanelBodyHeader } from 'components/ui/Panel';
|
|
|
|
|
2016-05-02 13:36:25 +05:30
|
|
|
export default function AuthError({error, onClose = function() {}}) {
|
|
|
|
return (
|
|
|
|
<PanelBodyHeader type="error" onClose={onClose}>
|
|
|
|
{errorsDict.resolve(error)}
|
|
|
|
</PanelBodyHeader>
|
|
|
|
);
|
2016-02-13 20:58:47 +05:30
|
|
|
}
|
2016-05-02 13:36:25 +05:30
|
|
|
|
|
|
|
AuthError.displayName = 'AuthError';
|
|
|
|
AuthError.propTypes = {
|
|
|
|
error: PropTypes.string.isRequired,
|
|
|
|
onClose: PropTypes.func
|
|
|
|
};
|