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