From cc169dbd9f304e01315749ee470606820eb9399e Mon Sep 17 00:00:00 2001 From: Martin Heppner <105971399+martinheppner@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:43:14 +0100 Subject: [PATCH] onclick modified --- src/views/Main/DetailReworked.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/views/Main/DetailReworked.js b/src/views/Main/DetailReworked.js index 1524bfc..1b60c70 100644 --- a/src/views/Main/DetailReworked.js +++ b/src/views/Main/DetailReworked.js @@ -556,18 +556,11 @@ const DetailReworked = (props) => { let imageUrl = ""; let description = ""; let URL = shareUrl(); - let target_url = ""; + if (!!tour) { page_title = "Zuugle: " + tour.title + " (" + tour.provider_name + ")"; imageUrl = tour?.image_url && tour?.image_url.length > 0 && tour?.image_url; description = tour?.description && tour?.description.length > 0 && tour?.description; - if (tour.provider==='bahnzumberg' && _city) { - target_url = tour.url + 'ab-' & _city; - } - else { - target_url = tour.url; - } - console.log("target_url = ", target_url) } return ( @@ -732,7 +725,14 @@ const DetailReworked = (props) => {
{ - window.open(target_url); + let url = tour?.url; + + // Bedingung für die spezielle URL-Konstruktion + if (tour?.provider === 'bahnzumberg' && _city) { + url += 'ab-' + _city + '/'; + } + + window.open(url); }} >