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

Add LoadableComponentErrorBoundary for handling ChunkLoadErrors #1416

Merged
merged 4 commits into from
Mar 4, 2021

Conversation

OtterleyW
Copy link
Contributor

@OtterleyW OtterleyW commented Feb 23, 2021

Adds ErrorBoundary for showing the error page if there's a ChunkLoadError

Screenshot 2021-03-03 at 11 04 21

@@ -11,7 +11,7 @@ import css from './LayoutSingleColumn.module.css';

const prepareChildren = children => {
const childrenCount = React.Children.count(children);
if (!(childrenCount === 3 || childrenCount === 4)) {
if (!(childrenCount === 2 || childrenCount === 3)) {
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 guess this has been a copy paster error from LayoutSideNavigation? Before the LoadableComponentErrorBoundaryPage we didn't have any page that would use LayoutSingleColumn without footer so that's why this has maybe not been noticed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Change also that ”Menu” on next line :)

@OtterleyW OtterleyW changed the title wip: Add LoadableComponentErrorBoundary for handling ChunkLoadErrors Add LoadableComponentErrorBoundary for handling ChunkLoadErrors Mar 3, 2021
const landingPagePath = pathByRouteName('LandingPage', routeConfiguration());
const handleOnClick = () => {
if (typeof window !== 'undefined') {
window.location = landingPagePath;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We want the app to make full page refresh when navigating back LandingPage. I'm not sure if there is some other (better) way to trigger that or if this is ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is fine.

@OtterleyW OtterleyW temporarily deployed to sharetribe-starter-app March 4, 2021 09:20 Inactive
@OtterleyW OtterleyW temporarily deployed to sharetribe-starter-app March 4, 2021 09:34 Inactive
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