import React, { Suspense } from "react"; import { Loader2 } from "lucide-react"; import AppShell from "@/components/app-shell/AppShell"; import AuthProvider from "@/components/auth/AuthProvider"; /** * Protected layout (RHL-020) * * Best practice for `useSearchParams()`: * - AuthProvider uses `useSearchParams()` (client hook). * - During production builds, static prerendering requires a Suspense boundary * above the component using `useSearchParams()`. * * This Suspense fallback will be part of the initial HTML for static rendering. * After hydration, AuthProvider takes over and performs the session check. */ function AuthProviderFallback() { return (
Sitzung wird vorbereitet…
); } export default function ProtectedLayout({ children }) { return ( }> {children} ); }