2021-08-16 16:46:10 +00:00
|
|
|
import { faDizzy } from "@fortawesome/free-regular-svg-icons";
|
2021-04-23 16:18:09 +00:00
|
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
|
|
import React, { FunctionComponent } from "react";
|
|
|
|
import { Button, Container } from "react-bootstrap";
|
2022-01-22 13:35:11 +00:00
|
|
|
import { Reload } from "utilities";
|
|
|
|
import { GithubRepoRoot } from "utilities/constants";
|
2021-04-23 16:18:09 +00:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
error: Error;
|
|
|
|
}
|
|
|
|
|
|
|
|
const UIError: FunctionComponent<Props> = ({ error }) => (
|
|
|
|
<Container className="d-flex flex-column align-items-center my-5">
|
|
|
|
<h1>
|
2021-08-16 16:46:10 +00:00
|
|
|
<FontAwesomeIcon className="mr-2" icon={faDizzy}></FontAwesomeIcon>
|
|
|
|
Oops! UI is crashed!
|
2021-04-23 16:18:09 +00:00
|
|
|
</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;
|