Commit 1b47ea7f authored by Stefan Probst's avatar Stefan Probst
Browse files

fix: reset error boundary on route change

parent 6ae8d484
Pipeline #178353 passed with stages
in 10 minutes and 24 seconds
......@@ -97,13 +97,17 @@ function Providers({ children }: PropsWithChildren<unknown>) {
/**
* App shell.
*/
export default function App({ Component, pageProps }: AppProps): JSX.Element {
export default function App({
Component,
pageProps,
router,
}: AppProps): JSX.Element {
return (
<Fragment>
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Head>
<ErrorBoundary fallback={ClientError}>
<ErrorBoundary fallback={ClientError} resetOnChange={[router.asPath]}>
<Providers {...pageProps}>
<Layout {...pageProps} default={PageLayout}>
<Component {...pageProps} />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment