blob: 4d86dc71bad035fa618a5ffe6910c809b0c9fe1e (
plain)
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
|
import { Reload } from "@/utilities";
import { GithubRepoRoot } from "@/utilities/constants";
import { faDizzy } from "@fortawesome/free-regular-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { FunctionComponent } from "react";
import { Button, Container } from "react-bootstrap";
interface Props {
error: Error;
}
const UIError: FunctionComponent<Props> = ({ error }) => (
<Container className="d-flex flex-column align-items-center my-5">
<h1>
<FontAwesomeIcon className="mr-2" icon={faDizzy}></FontAwesomeIcon>
Oops! UI is crashed!
</h1>
<p>{error.message}</p>
<div className="d-flex flex-row">
<Button
className="mx-1"
href={`${GithubRepoRoot}/issues/new/choose`}
target="_blank"
variant="warning"
>
Report Issue
</Button>
<Button className="mx-1" onClick={Reload} variant="light">
Reload Page
</Button>
</div>
</Container>
);
export default UIError;
|