Skip to content

Commit

Permalink
🐛 On product page, custom CTA on external links (beginning with http*…
Browse files Browse the repository at this point in the history
…) should open in another window #1530
  • Loading branch information
ithiame committed Dec 10, 2024
1 parent 6d2599e commit 23c74ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/routes/(app)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@
href={link.href}
class=" {data.notResponsive ? '' : 'hidden lg:inline'}"
data-sveltekit-preload-data="off"
target={link.href.startsWith('http') ? '_blank' : '_self'}
>
{link.label}
</a>
Expand Down
2 changes: 2 additions & 0 deletions src/routes/(app)/product/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@
)
? 'break-all'
: ''} "
target={cta.href.startsWith('http') ? '_blank' : '_self'}
>
{cta.label}
</a>
Expand All @@ -545,6 +546,7 @@
)
? 'break-all'
: ''} "
target={cta.href.startsWith('http') ? '_blank' : '_self'}
>
{cta.label}
</a>
Expand Down

0 comments on commit 23c74ca

Please sign in to comment.