Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Back to Home button in global error #456

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zerts
Copy link
Contributor

@zerts zerts commented Apr 4, 2024

No description provided.

Copy link

github-actions bot commented Apr 4, 2024

📦 build.zip [updated at May 8, 4:43:16 PM UTC]

@@ -131,7 +133,7 @@ export function ViewError({
if (pageTemplateType !== 'dialog') {
navigate('/');
}
window.location.reload();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can something break because we're no longer reloading the page?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I'll check

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, tbh.
My logic was: we are updating a prop for ErrorBoundary, so it should be updated after going to home screen. However, I think window.reload can be helpful

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're reloading, what does onRetry accomplish?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looked like GlobalBoundary wasn't updated during this reload properly. I will check again

@zerts zerts force-pushed the fix/fix-global-error-screen branch from c39f893 to 55068bd Compare May 8, 2024 16:34
@zerts zerts marked this pull request as draft May 16, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants