Skip to content

Commit

Permalink
chore: Deactivate automatic link prefetching for /blog links (calco…
Browse files Browse the repository at this point in the history
…m#7751)

* disable prefetch on the `Tips` cards
  • Loading branch information
p6l-richard authored Mar 15, 2023
1 parent a575190 commit 2cc937b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ui/components/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ export function Card({
onClick={actionButton?.onClick}
target="_blank"
rel="noreferrer"
className="text-xs font-medium">
className="text-xs font-medium"
// NextJS thinks this is an internal link and tries to prefetch it (also on hover), which fails
// TODO: Extract this into a constant to handle /docs & /developer as well
prefetch={!learnMore.href.startsWith("https://cal.com/blog")}>
{learnMore.text}
</Link>
)}
Expand Down

0 comments on commit 2cc937b

Please sign in to comment.