Jetzt muss noch Links für polylines mit localStorage oder Recoil gelöst werden, alle Links für alle Geräte funktionieren gut

This commit is contained in:
ISA
2024-09-04 09:52:52 +02:00
parent 3c433b9003
commit eea9a3af4c
3 changed files with 26 additions and 68 deletions

View File

@@ -1,4 +1,4 @@
// /utils/openInNewTab.js
// utils/openInNewTab.js
export function openInNewTab(e, target) {
const BASE_URL = process.env.NEXT_PUBLIC_BASE_URL;
@@ -8,9 +8,8 @@ export function openInNewTab(e, target) {
if (target instanceof L.Marker && target.options.link) {
// Verwende den Link, der im Marker gespeichert ist
link = `${BASE_URL}${target.options.link}`;
//link = target.options.link;
} else if (target instanceof L.Polyline) {
// Polyline-Logik bleibt unverändert
// Polyline-Logik
const idLD = target.options.idLD;
if (idLD) {
link = `${BASE_URL}cpl.aspx?id=${idLD}`;