Skip to content

Commit

Permalink
onclick modified
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheppner committed Dec 15, 2024
1 parent e7bff55 commit cc169db
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/views/Main/DetailReworked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -732,7 +725,14 @@ const DetailReworked = (props) => {
<div
className="tour-detail-provider-container"
onClick={() => {
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);
}}
>
<div className="tour-detail-provider-icon">
Expand Down

0 comments on commit cc169db

Please sign in to comment.