/** * Example Root Layout with Analytics * * Shows how to integrate the AnalyticsProvider in a Next.js App Router layout. */ import { Suspense, type ReactNode } from 'react'; import { AnalyticsProvider } from './analytics-provider'; // ───────────────────────────────────────────────────────────────────────────── // Layout // ───────────────────────────────────────────────────────────────────────────── interface RootLayoutProps { children: ReactNode; } export default function RootLayout({ children }: RootLayoutProps) { return ( {/* * Wrap in Suspense because AnalyticsProvider uses useSearchParams() * which requires a Suspense boundary in Next.js 13+ */} {children} ); } // ───────────────────────────────────────────────────────────────────────────── // Metadata // ───────────────────────────────────────────────────────────────────────────── export const metadata = { title: 'My App', description: 'Example Next.js app with analytics', };