Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Since we use the Next.js's
Link
component dynamically, it sadly always tries to prefetch even external links and request RSC versions of said pages. This causes exceptions such as (https://nodejs-org.sentry.io/issues/4616983365/?project=4506191307735040&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=14d&stream_index=1).In the future we will always be relying on Next.js's Link component as we remove the remainder of static Components such as Header and Footer and others, hence we should actually use the approach we had until before, that was being handled by LocalizedLink component, and that we removed as
next-intl
has a built-in Link component.But we still need a custom Link component to simply handle these scenarios of when the URL is external or not defined to not used Next.js's Link Component and simply a bare-bones
a
element.Validation
All links should be working, external links such as the SHASUMS256 should not be requesting prefetching anymore
Related Issues
Sentry: https://nodejs-org.sentry.io/issues/4616983365/