-
Notifications
You must be signed in to change notification settings - Fork 0
/
ErrorPage.tsx
executable file
·37 lines (33 loc) · 994 Bytes
/
ErrorPage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* SPDX-FileCopyrightText: 2014-present Kriasoft <hello@kriasoft.com> */
/* SPDX-License-Identifier: MIT */
import { Container, CssBaseline, Typography } from "@material-ui/core";
import * as React from "react";
import type { History } from "../core/history";
export type ErrorPageProps = {
error: Error;
history: History;
};
export function ErrorPage(props: ErrorPageProps): JSX.Element {
const { error } = props;
return (
<Container sx={{ marginTop: "43vh" }}>
<CssBaseline />
<Container maxWidth="sm">
<Typography
variant="h1"
align="center"
sx={{
fontSize: "2em",
fontWeight: 300,
"& strong": {
fontWeight: 400,
},
}}
>
{/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
<strong>Error {(error as any).status || 500}</strong>: {error.message}
</Typography>
</Container>
</Container>
);
}