From 23c74ca886afcc3faeb12a3b9683047a6cbf516a Mon Sep 17 00:00:00 2001 From: ithiame Date: Tue, 10 Dec 2024 14:39:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20On=20product=20page,=20custom=20?= =?UTF-8?q?CTA=20on=20external=20links=20(beginning=20with=20http*)=20shou?= =?UTF-8?q?ld=20open=20in=20another=20window=20#1530?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/(app)/+layout.svelte | 1 + src/routes/(app)/product/[id]/+page.svelte | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 8c1a7fb83..94122d4f3 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -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} diff --git a/src/routes/(app)/product/[id]/+page.svelte b/src/routes/(app)/product/[id]/+page.svelte index 1cdb9e130..1cc1982f7 100644 --- a/src/routes/(app)/product/[id]/+page.svelte +++ b/src/routes/(app)/product/[id]/+page.svelte @@ -534,6 +534,7 @@ ) ? 'break-all' : ''} " + target={cta.href.startsWith('http') ? '_blank' : '_self'} > {cta.label} @@ -545,6 +546,7 @@ ) ? 'break-all' : ''} " + target={cta.href.startsWith('http') ? '_blank' : '_self'} > {cta.label}