Behebe Impressum/Datenschutz-Tab und bereinige UI

- Impressum-Tab zeigt jetzt korrekt rechtliche Informationen an
- Direkter HTTP-Endpoint /api/legal-config als Workaround für RPC-Problem
- Client-Komponente verwendet fetch() anstatt RPC-Calls
- Debug-Logs hinzugefügt für bessere Fehlerdiagnose
- Hinweis-Text über Umgebungsvariablen entfernt für saubereres Design
- Legal-Konfiguration funktioniert jetzt vollständig mit echten Daten
- Tab-Navigation zwischen Impressum und Datenschutz funktioniert
This commit is contained in:
2025-09-30 18:25:50 +02:00
parent 40d76680fd
commit 90e48c82ac
3 changed files with 40 additions and 6 deletions

View File

@@ -16,6 +16,18 @@ app.get("/health", (c) => {
return c.json({ status: "ok", timestamp: new Date().toISOString() });
});
// Legal config endpoint (temporary fix for RPC issue)
app.get("/api/legal-config", async (c) => {
try {
const { getLegalConfig } = await import("./lib/legal-config");
const config = getLegalConfig();
return c.json(config);
} catch (error) {
console.error("Legal config error:", error);
return c.json({ error: "Failed to load legal config" }, 500);
}
});
app.route("/rpc", rpcApp);
app.get("/*", clientEntry);

View File

@@ -3,6 +3,14 @@ import { getLegalConfig } from "@/server/lib/legal-config";
export const router = {
getConfig: os.handler(async () => {
return getLegalConfig();
console.log("Legal getConfig called");
try {
const config = getLegalConfig();
console.log("Legal config:", config);
return config;
} catch (error) {
console.error("Legal config error:", error);
throw error;
}
}),
};