//@flow import React from "react"; import { translate } from "react-i18next"; import Notification from "./Notification"; type Props = { t: string => string, error?: Error }; class ErrorNotification extends React.Component { render() { const { t, error } = this.props; if (error) { return ( {t("error-notification.prefix")}: {error.message} ); } return null; } } export default translate("commons")(ErrorNotification);