From d362ca2af47037a9c2479759a2c18234732ee8b1 Mon Sep 17 00:00:00 2001 From: Jelle van Snik Date: Fri, 18 Feb 2022 14:55:22 +0100 Subject: [PATCH] some small error boundary updates --- README.md | 1 + src/components/layout/ErrorBoundary.tsx | 5 ++--- src/views/SearchView.tsx | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 98c11808..02ecc370 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,4 @@ Check out [this project's issues](https://github.com/JamesHawkinss/movie-web/iss - [x] Better looking error boundary - [ ] sort search results so they aren't sorted by provider - [ ] Get rid of react warnings +- [ ] Link Github and Discord in error boundary diff --git a/src/components/layout/ErrorBoundary.tsx b/src/components/layout/ErrorBoundary.tsx index fcb386d0..c79205bb 100644 --- a/src/components/layout/ErrorBoundary.tsx +++ b/src/components/layout/ErrorBoundary.tsx @@ -42,7 +42,6 @@ export class ErrorBoundary extends Component<{}, ErrorBoundaryState> { render() { if (!this.state.hasError) return this.props.children; - // TODO make pretty return (
@@ -54,8 +53,8 @@ export class ErrorBoundary extends Component<{}, ErrorBoundaryState> {

{this.state.error ? ( -
-

+

+

{this.state.error.name} - {this.state.error.description}

{this.state.error.path}

diff --git a/src/views/SearchView.tsx b/src/views/SearchView.tsx index 8d345c1f..3c75e594 100644 --- a/src/views/SearchView.tsx +++ b/src/views/SearchView.tsx @@ -19,7 +19,6 @@ import { useLoading } from "hooks/useLoading"; import { IconPatch } from "components/Buttons/IconPatch"; function SearchLoading() { - throw new Error("testing"); return ; }