feat: better ErrorBoundary UI (#1993)
This commit is contained in:
@@ -32,7 +32,11 @@ export class ErrorBoundary extends React.Component<
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.state.hasError) {
|
if (this.state.hasError) {
|
||||||
return <h1>Something went wrong.</h1>;
|
return (
|
||||||
|
<div className="fixed inset-0 w-full h-full flex items-center justify-center bg-background">
|
||||||
|
<h1 className="text-xl font-semibold text-foreground">Something went wrong.</h1>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.props.children;
|
return this.props.children;
|
||||||
|
|||||||
Reference in New Issue
Block a user