Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
1b47ea7f
Commit
1b47ea7f
authored
Mar 05, 2021
by
Stefan Probst
Browse files
fix: reset error boundary on route change
parent
6ae8d484
Pipeline
#178353
passed with stages
in 10 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/pages/_app.tsx
View file @
1b47ea7f
...
...
@@ -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
}
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment