1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

some small error boundary updates

This commit is contained in:
Jelle van Snik 2022-02-18 14:55:22 +01:00
parent 36737490a8
commit d362ca2af4
3 changed files with 3 additions and 4 deletions

View file

@ -45,3 +45,4 @@ Check out [this project's issues](https://github.com/JamesHawkinss/movie-web/iss
- [x] Better looking error boundary - [x] Better looking error boundary
- [ ] sort search results so they aren't sorted by provider - [ ] sort search results so they aren't sorted by provider
- [ ] Get rid of react warnings - [ ] Get rid of react warnings
- [ ] Link Github and Discord in error boundary

View file

@ -42,7 +42,6 @@ export class ErrorBoundary extends Component<{}, ErrorBoundaryState> {
render() { render() {
if (!this.state.hasError) return this.props.children; if (!this.state.hasError) return this.props.children;
// TODO make pretty
return ( return (
<div className="flex min-h-screen w-full flex-col items-center justify-center px-4 py-12"> <div className="flex min-h-screen w-full flex-col items-center justify-center px-4 py-12">
<div className="flex flex-col items-center justify-start text-center"> <div className="flex flex-col items-center justify-start text-center">
@ -54,8 +53,8 @@ export class ErrorBoundary extends Component<{}, ErrorBoundaryState> {
</p> </p>
</div> </div>
{this.state.error ? ( {this.state.error ? (
<div className="bg-denim-300 mt-12 max-w-4xl rounded px-6 py-4"> <div className="bg-denim-300 w-4xl mt-12 max-w-full rounded px-6 py-4">
<p className="mb-2 break-words font-bold text-white"> <p className="mb-1 break-words font-bold text-white">
{this.state.error.name} - {this.state.error.description} {this.state.error.name} - {this.state.error.description}
</p> </p>
<p className="break-words">{this.state.error.path}</p> <p className="break-words">{this.state.error.path}</p>

View file

@ -19,7 +19,6 @@ import { useLoading } from "hooks/useLoading";
import { IconPatch } from "components/Buttons/IconPatch"; import { IconPatch } from "components/Buttons/IconPatch";
function SearchLoading() { function SearchLoading() {
throw new Error("testing");
return <Loading className="my-12" text="Fetching your favourite shows..." />; return <Loading className="my-12" text="Fetching your favourite shows..." />;
} }