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: "Aborting fetching component for router" #1114

Merged
merged 1 commit into from
Nov 9, 2022
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Nov 9, 2022

What it solves

Resolves #1112

How this PR fixes it

As we don't want to interact with the DOM, useLayoutEffect removed the error (which was caused by calling router.replace too many times).

How to test it

Open / and observe no error in the console. Navigating to the following should work as before:

  • Previously used Safe: ?safe=xyz:0x123
  • Currently selected network: ?chain=xyz (no added Safe)
  • Otherwise: /welcome

@iamacook iamacook marked this pull request as ready for review November 9, 2022 09:14
@iamacook iamacook requested a review from schmanu November 9, 2022 09:14
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6273c87
Status: ✅  Deploy successful!
Preview URL: https://1d760eb6.web-core.pages.dev
Branch Preview URL: https://fix-router-error.web-core.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link
Member

@schmanu schmanu left a comment

Choose a reason for hiding this comment

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

When tested the routing errors do not show up anymore :)

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

🧠 👍

@iamacook iamacook merged commit 38924fe into dev Nov 9, 2022
@iamacook iamacook deleted the fix-router-error branch November 9, 2022 13:07
@usame-algan usame-algan mentioned this pull request Nov 14, 2022
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.

Aborting fetching component for router
3 participants