Skip to content

Commit 49d8026

Browse files
Don’t render Next <Link> for /plus urls (#2316)
This should hopefully stop all the RSC prefetches from happening on page load.
1 parent a333c84 commit 49d8026

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/mdx-components.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ const components = {
7272
h6: createHeading(6),
7373

7474
a(props) {
75+
if (props.href?.startsWith("/plus") || props.href?.startsWith("https://tailwindcss.com/plus")) {
76+
return <a {...props} />;
77+
}
78+
7579
return <Link {...(props as React.ComponentProps<typeof Link>)} />;
7680
},
7781

0 commit comments

Comments
 (0)