Files
pragativeer-v2-prelaunch/src/app/layout.tsx

58 lines
1.8 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import Script from "next/script";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "PragatiVeer - AI Powered NEET/JEE Preparation",
description: "Experience the most accurate Computer-Based Test Exam Engine combined with adaptive Daily Practice Problems generated specifically for your weak areas in real-time.",
keywords: "NEET, JEE, Prep, AI, CBT, DPP, Online Test, Study",
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html
lang="en"
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
suppressHydrationWarning
>
<head>
<Script
id="theme-script"
strategy="beforeInteractive"
dangerouslySetInnerHTML={{
__html: `
try {
if (window.location.pathname.startsWith('/dashboard') || window.location.pathname.startsWith('/cbt')) {
if (localStorage.getItem('theme') === 'dark' || (!localStorage.getItem('theme') && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
} else {
document.documentElement.classList.add('dark')
}
} catch (_) {}
`,
}}
/>
</head>
<body className="min-h-full flex flex-col">{children}</body>
</html>
);
}