2025-08-20 18:02:50 +09:00
|
|
|
import type { Metadata } from "next";
|
|
|
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
2025-12-11 18:47:24 +09:00
|
|
|
import { headers } from "next/headers";
|
2025-08-20 18:02:50 +09:00
|
|
|
import "./globals.css";
|
2025-09-20 11:35:40 +09:00
|
|
|
import { QueryProvider } from "@/lib/providers";
|
2025-09-18 14:52:26 +09:00
|
|
|
import { SessionTimeoutWarning } from "@/features/auth/components/SessionTimeoutWarning";
|
2025-08-20 18:02:50 +09:00
|
|
|
|
|
|
|
|
const geistSans = Geist({
|
|
|
|
|
variable: "--font-geist-sans",
|
|
|
|
|
subsets: ["latin"],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const geistMono = Geist_Mono({
|
|
|
|
|
variable: "--font-geist-mono",
|
|
|
|
|
subsets: ["latin"],
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
|
title: "Assist Solutions Portal",
|
|
|
|
|
description: "Manage your subscriptions, billing, and support with Assist Solutions",
|
|
|
|
|
};
|
|
|
|
|
|
2025-11-19 17:14:36 +09:00
|
|
|
// Disable static generation for the entire app since it uses dynamic features extensively
|
|
|
|
|
// This is the recommended approach for apps with heavy useSearchParams usage
|
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
|
|
2025-12-11 18:47:24 +09:00
|
|
|
export default async function RootLayout({
|
2025-08-20 18:02:50 +09:00
|
|
|
children,
|
|
|
|
|
}: Readonly<{
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
}>) {
|
2025-12-11 18:47:24 +09:00
|
|
|
// Get nonce from proxy.ts for CSP-compliant inline scripts
|
|
|
|
|
const headersList = await headers();
|
|
|
|
|
const nonce = headersList.get("x-nonce") || undefined;
|
|
|
|
|
|
2025-08-20 18:02:50 +09:00
|
|
|
return (
|
|
|
|
|
<html lang="en" suppressHydrationWarning>
|
2025-08-22 17:02:49 +09:00
|
|
|
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
|
2025-12-11 18:47:24 +09:00
|
|
|
<QueryProvider nonce={nonce}>
|
2025-08-20 18:02:50 +09:00
|
|
|
{children}
|
|
|
|
|
<SessionTimeoutWarning />
|
|
|
|
|
</QueryProvider>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
);
|
|
|
|
|
}
|