add stuff that was mysteriously missing from error-boundary
This commit is contained in:
parent
8a64798e32
commit
0b18a3e1c5
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class ErrorBoundary extends React.Component {
|
||||||
|
|
||||||
static getDerivedStateFromError(error) {
|
static getDerivedStateFromError(error) {
|
||||||
// Update state so the next render will show the fallback UI.
|
// Update state so the next render will show the fallback UI.
|
||||||
return { hasError: true };
|
return { hasError: true, error };
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidCatch(error, errorInfo) {
|
componentDidCatch(error, errorInfo) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ const Event = ({ evt, units }) => {
|
||||||
return <Md>Note a recognized event: {JSON.stringify(evt, null ,2)}</Md>
|
return <Md>Note a recognized event: {JSON.stringify(evt, null ,2)}</Md>
|
||||||
}
|
}
|
||||||
|
|
||||||
const EventGroup = ({ type='info', events=[], units='metric' }) => events.length > 0 ? (
|
export const EventGroup = ({ type='info', events=[], units='metric' }) => events.length > 0 ? (
|
||||||
<div className="">
|
<div className="">
|
||||||
<h3 className="capitalize" id={`events-${type}`}>{type}</h3>
|
<h3 className="capitalize" id={`events-${type}`}>{type}</h3>
|
||||||
<table className="table w-full mdx">
|
<table className="table w-full mdx">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue