"use client"; import { useEffect, useState } from "react"; import { goToAdminLogin } from "@/lib/admin-auth"; /** * This app has no login form: signing in happens once, on admin.nachklang.art, * for every Nachklang app. Copied from nachklang-feedback. * * The route exists as a forwarder so proxy.ts has a stable path on this origin * to send signed-out visitors to, rather than building an external URL inside * the proxy. */ export default function AdminLoginPage() { // Read from the URL directly rather than with useSearchParams(): this page is // prerendered, and useSearchParams() opts the whole route into client-side // rendering unless it sits inside a boundary. const [redirect] = useState(() => typeof window === "undefined" ? null : new URLSearchParams(window.location.search).get("redirect"), ); useEffect(() => { // Passed straight through; the admin app validates it against its own // origin allow-list, and a second check here could only drift from that. goToAdminLogin(redirect || "/admin"); }, [redirect]); return (

Weiterleitung zur Nachklang-Anmeldung …

); }