// Geheimer Vorschau-Link (2026-10-26): wer ihn kennt, sieht die Preview ohne Login. // Das Portal löst ihn ein (Cookie + Weiterleitung), siehe Kundenportal server/services/vorschauLink.js. const PORTAL = 'https://project.webklar.com' export function vorschauLinkUrl(project, base = PORTAL) { const subdomain = String(project?.subdomain || '').trim().toLowerCase() const token = String(project?.shareToken || '').trim() if (!subdomain || !token) return '' return `${String(base).replace(/\/$/, '')}/vorschau/${encodeURIComponent(subdomain)}/${encodeURIComponent(token)}` }