//@flow import React from "react"; import ErrorNotification from "./ErrorNotification"; import { BackendError } from "./errors"; type Props = { error: Error, title: string, subtitle: string }; class ErrorPage extends React.Component { render() { const { title, error } = this.props; return (

{title}

{this.renderSubtitle()}
); } renderSubtitle = () => { const { error, subtitle } = this.props; if (error instanceof BackendError) { return null; } return

{subtitle}

} } export default ErrorPage;