diff options
author | Liang Yi <[email protected]> | 2022-01-22 21:35:11 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-22 21:35:11 +0800 |
commit | d8d2300980ca69a4ae6511cb49a6dc548c0da793 (patch) | |
tree | 23f2f136c495b4064f43a0c4148391c46b9fa997 /frontend/src/pages/UIError.tsx | |
parent | 6b82a734e2bc597b219472774c0ec58038630c65 (diff) | |
download | bazarr-d8d2300980ca69a4ae6511cb49a6dc548c0da793.tar.gz bazarr-d8d2300980ca69a4ae6511cb49a6dc548c0da793.zip |
Add React-Query to improve network and cache performancev1.0.3-beta.15
Diffstat (limited to 'frontend/src/pages/UIError.tsx')
-rw-r--r-- | frontend/src/pages/UIError.tsx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/frontend/src/pages/UIError.tsx b/frontend/src/pages/UIError.tsx new file mode 100644 index 000000000..ba87bb588 --- /dev/null +++ b/frontend/src/pages/UIError.tsx @@ -0,0 +1,35 @@ +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; |