feat(gtm): add aspect ratio & corporate design; fix(market): harden backend logging & json parsing

This commit is contained in:
2026-01-05 11:42:15 +00:00
parent 7cd90f77e3
commit aa1319856c
10 changed files with 241 additions and 169 deletions

View File

@@ -1,11 +1,9 @@
import { LeadStatus, AnalysisResult, Competitor, Language, Tier, EmailDraft, SearchStrategy, SearchSignal, OutreachResponse } from "../types";
// URL Konfiguration:
// Im Production-Build (Docker/Nginx) nutzen wir den relativen Pfad '/api', da Nginx als Reverse Proxy fungiert.
// Im Development-Modus (lokal) greifen wir direkt auf den Port 3001 zu.
const API_BASE_URL = (import.meta as any).env.PROD
? 'api'
: `http://${window.location.hostname}:3001/api`;
// Wir nutzen IMMER den relativen Pfad './api', damit Requests korrekt über den Nginx Proxy (/market/api/...) laufen.
// Direkter Zugriff auf Port 3001 ist im Docker-Deployment von außen nicht möglich.
const API_BASE_URL = './api';
// Helper to extract JSON (kann ggf. entfernt werden, wenn das Backend immer sauberes JSON liefert)
const extractJson = (text: string): any => {