keyboard radiogroup, modal focus trap, nav session hydration
All checks were successful
Build and Push / build (push) Successful in 1m53s

This commit is contained in:
2026-05-29 22:46:03 +02:00
parent bff3aad1ca
commit 7fac3c3aa8
4 changed files with 144 additions and 48 deletions

View File

@@ -6,6 +6,7 @@ import { signOut, useSession } from "next-auth/react";
import { usePathname } from "@/i18n/navigation";
import { Link } from "@/i18n/navigation";
import { SessionProvider } from "next-auth/react";
import type { Session } from "next-auth";
import { LanguageSwitcher } from "@/components/ui/language-switcher";
function NavBar() {
@@ -211,9 +212,19 @@ function NavLink({
);
}
export function NavShell({ children }: { children: React.ReactNode }) {
export function NavShell({
children,
session,
}: {
children: React.ReactNode;
// Server-resolved session passed down from the locale layout. Seeding
// SessionProvider with it means useSession() is populated on the first
// client render, so the nav links render immediately instead of
// popping in after the client-side session fetch (CLS / flash).
session: Session | null;
}) {
return (
<SessionProvider>
<SessionProvider session={session}>
<NavBar />
<main className="mx-auto max-w-6xl px-5 py-8">{children}</main>
</SessionProvider>