From 95944d87b5cd33b66f768861395a0e692d117a8b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 18 Nov 2019 12:39:18 +0200 Subject: [PATCH] PrettyError: redesign to make more reusable. --- src/components/ErrorBoundary.tsx | 5 ++++- src/widgets/PrettyError.tsx | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index c292693..fd2cd73 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -59,7 +59,10 @@ class ErrorBoundary extends React.Component { if (error) { return ( - +
+

Something went wrong!

+ +
); } return this.props.children; diff --git a/src/widgets/PrettyError.tsx b/src/widgets/PrettyError.tsx index d095ce1..5c544ae 100644 --- a/src/widgets/PrettyError.tsx +++ b/src/widgets/PrettyError.tsx @@ -2,12 +2,10 @@ import * as React from 'react'; export const PrettyError = React.memo((props: any) => (
-

Something went wrong!

-
+    
       {props.error.message}
     
-

Stack trace:

       {props.error.stack}