You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bazarr/frontend/src/pages/UIError.tsx

36 lines
1015 B

import { faDizzy } from "@fortawesome/free-regular-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent } from "react";
import { Button, Container } from "react-bootstrap";
import { Reload } from "utilities";
import { GithubRepoRoot } from "utilities/constants";
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;