1
0
Fork 0

add stuff that was mysteriously missing from error-boundary

This commit is contained in:
Enoch Riese 2022-07-17 15:03:27 -04:00
parent 8a64798e32
commit 0b18a3e1c5
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ class ErrorBoundary extends React.Component {
static getDerivedStateFromError(error) {
// Update state so the next render will show the fallback UI.
return { hasError: true };
return { hasError: true, error };
}
componentDidCatch(error, errorInfo) {

View file

@ -24,7 +24,7 @@ const Event = ({ evt, units }) => {
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="">
<h3 className="capitalize" id={`events-${type}`}>{type}</h3>
<table className="table w-full mdx">