diff --git a/app/layout.tsx b/app/layout.tsx index 05983ec3..ff3b2a08 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,11 +1,11 @@ -import type { Metadata } from "next"; -import { Geist } from "next/font/google"; +'use client' import { ThemeProvider } from "next-themes"; import { Toaster } from "sonner"; import { ErrorBoundary } from "@/components/ErrorBoundary"; import { GlobalErrorHandler } from "@/components/GlobalErrorHandler"; import AIProvider from "@/components/ai/AIProvider"; -import { getPageMetadata, getPageStructuredData } from "@/lib/seo/metadata"; +import { getPageStructuredData } from "@/lib/seo/metadata"; +import { usePathname } from "next/navigation"; // Only load dev tools in development const ReactDevTools = () => null; @@ -16,26 +16,13 @@ import "./globals.css"; // ? `https://${process.env.VERCEL_URL}` // : "http://localhost:3000"; -export const metadata: Metadata = getPageMetadata('home', { - title: "Codeunia – Empowering Coders Globally", - description: "Join the global coding community. Participate in hackathons, compete on leaderboards, and advance your coding skills with Codeunia.", - keywords: ['coding', 'hackathons', 'programming', 'developer', 'competition', 'leaderboard', 'coding community'], - url: '/', - type: 'website' -}); - -const geistSans = Geist({ - variable: "--font-geist-sans", - display: "swap", - subsets: ["latin"], -}); - export default function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { const structuredData = getPageStructuredData('home'); + const pathname = usePathname(); return ( @@ -84,7 +71,7 @@ export default function RootLayout({ {/* Viewport for mobile optimization */} -
+