Breakpoint clones were still in the tab order, marketing always painted Log in, and at 430px the logo overlay covered Use cases and Learn. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Suspense, type ReactNode } from "react";
|
|
import ConditionalNavigation from "../components/navigation/ConditionalNavigation";
|
|
import SkipToContent from "../components/navigation/SkipToContent";
|
|
import { MessagesProvider } from "../contexts/MessagesContext";
|
|
import { AuthModalProvider } from "../contexts/AuthModalContext";
|
|
import messages from "../../messages/en/index";
|
|
import { MAIN_CONTENT_ID } from "../../lib/mainContent";
|
|
import { NO_INDEX_ROBOTS } from "../../lib/siteMetadata";
|
|
|
|
export const metadata: Metadata = {
|
|
robots: NO_INDEX_ROBOTS,
|
|
};
|
|
|
|
// `force-dynamic` removed in favor of `experimental.cacheComponents` (Next 16).
|
|
// See `(app)/layout.tsx` for the matching `<Suspense fallback={null}>` rationale
|
|
// — the fallback can't access `usePathname()` since it sits in the static shell.
|
|
//
|
|
// Operator/admin dashboards (e.g. `/monitor`) intentionally render without the
|
|
// public marketing footer. Auth/access is enforced upstream.
|
|
export default function AdminLayout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<MessagesProvider messages={messages}>
|
|
<AuthModalProvider>
|
|
<SkipToContent />
|
|
<Suspense fallback={null}>
|
|
<ConditionalNavigation />
|
|
</Suspense>
|
|
<main
|
|
id={MAIN_CONTENT_ID}
|
|
tabIndex={-1}
|
|
className="flex-1 outline-none"
|
|
>
|
|
{children}
|
|
</main>
|
|
</AuthModalProvider>
|
|
</MessagesProvider>
|
|
);
|
|
}
|