|
|
@ -78,17 +78,16 @@ The `ComponentError` component is a pre-built error state that can be used to di |
|
|
|
import { ErrorBoundary } from 'react-error-boundary'; |
|
|
|
import { ErrorBoundary } from 'react-error-boundary'; |
|
|
|
|
|
|
|
|
|
|
|
<ErrorBoundary |
|
|
|
<ErrorBoundary |
|
|
|
// eslint-disable-next-line react/no-unstable-nested-components |
|
|
|
fallbackRender={({ error, resetErrorBoundary }) => ( |
|
|
|
fallbackRender={({ error: e, resetErrorBoundary }) => ( |
|
|
|
|
|
|
|
<ComponentError |
|
|
|
<ComponentError |
|
|
|
componentName="BrowserNotifyModal" |
|
|
|
componentName="DesktopContent" |
|
|
|
message={e.message} |
|
|
|
message={error.message} |
|
|
|
retryFunction={resetErrorBoundary} |
|
|
|
retryFunction={resetErrorBoundary} |
|
|
|
/> |
|
|
|
/> |
|
|
|
)} |
|
|
|
)} |
|
|
|
> |
|
|
|
> |
|
|
|
<YourFunctionality/> |
|
|
|
<YourComponent /> |
|
|
|
</ErrorBoundary |
|
|
|
</ErrorBoundary> |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
## Storybook |
|
|
|
## Storybook |
|
|
|