Skip to content

Commit

Permalink
fix: Get offer url only when enableClientOffer is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfp13 committed Feb 12, 2025
1 parent 95e1ac6 commit b1470b8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/core/src/pages/[slug]/p.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@ function Page({ data: server, sections, globalSections, offers, meta }: Props) {

return (
<>
<Head>
<link
rel="preload"
href={getOfferUrl(product.sku)}
as="fetch"
crossOrigin="anonymous"
fetchPriority="high"
/>
</Head>
{isClientOfferEnabled && (
<Head>
<link
rel="preload"
href={getOfferUrl(product.sku)}
as="fetch"
crossOrigin="anonymous"
fetchPriority="high"
/>
</Head>
)}
{/* SEO */}
<NextSeo
title={meta.title}
Expand Down

0 comments on commit b1470b8

Please sign in to comment.