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

Exclude external links from triggering progress bar #909

Conversation

portdeveloper
Copy link
Contributor

Description

-> Modifies the nprogress bar so that it only forks for non external links.

-> Implements the changes from:
BuidlGuidl/extensions-hackathon#23 (comment)

GeMKw0BD7x.mp4

Additional Information

Related Issues

Fixes #908

Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request.

Your ENS/address:

Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

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

Tyms @portdeveloper !!! Lol this is has been bugging me for while and I was procrastinating to dig in and tackle it.

The approach makes sense! and works nicely! Just pushed a small commit at f8fb7ac to narrow the condition limited only to "target=_blank" (when new tab is open we ignore nprogress)

Becuase with NextJs link you can pass it target it example: next docs Link prop => good to know section:

<Link href={"/debug"} target="_self">
  Debug
</Link>

also I was checking one of the next progress library code and they had similar narrower check their too

@technophile-04 technophile-04 merged commit 0e18439 into scaffold-eth:main Aug 15, 2024
1 check passed
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.

bug: anchor tags with _blank as target trigger nprogress bar
2 participants