added styled error page

This commit is contained in:
Sebastian Sdorra
2018-07-12 12:57:23 +02:00
parent a542fcb0c4
commit 4b27c67bd9
2 changed files with 35 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import Header from "../components/Header";
import PrimaryNavigation from "../components/PrimaryNavigation";
import Loading from "../components/Loading";
import ErrorNotification from "../components/ErrorNotification";
import ErrorPage from "../components/ErrorPage";
type Props = {
me: any,
@@ -40,7 +41,13 @@ class App extends Component<Props> {
content = <Loading />;
} else if (error) {
// TODO add error page instead of plain notification
content = <ErrorNotification error={error} />;
content = (
<ErrorPage
title="Error"
subtitle="Unknown error occurred"
error={error}
/>
);
} else if (!me) {
content = <Login />;
} else {