Skip to content

Commit

Permalink
Add end by default
Browse files Browse the repository at this point in the history
  • Loading branch information
istarkov committed Oct 11, 2024
1 parent ada2b47 commit b23e817
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export const wrapLinkComponent = (BaseLink: typeof Link) => {
// always render simple <a> in canvas and preview
// since remix links do not affect it
if (renderer !== "canvas" && renderer !== "preview") {
return <RemixLink {...props} to={href} ref={ref} />;
// In the future, we will switch to the :local-link pseudo-class (https://developer.mozilla.org/en-US/docs/Web/CSS/:local-link). (aria-current="page" is used now)
// Therefore, we decided to use end={true} (exact route matching) for all links to facilitate easier migration.
return <RemixLink {...props} to={href} ref={ref} end />;
}
}

Expand Down

0 comments on commit b23e817

Please sign in to comment.