Update src/app/layout.tsx

This commit is contained in:
2026-03-07 23:03:33 +00:00
parent 135646dc81
commit 7382a4ec7a

View File

@@ -1,17 +1,14 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { DM_Sans } from "next/font/google";
import "./styles/variables.css";
import "./styles/base.css";
const geist = Geist({
variable: "--font-geist-sans", subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono", subsets: ["latin"],
const dmSans = DM_Sans({
variable: "--font-dm-sans", subsets: ["latin"],
});
export const metadata: Metadata = {
title: "EXPERT DENTAL CARE", description: "Expert Dental Care provides comprehensive dental treatments with experienced dentists and advanced technology."};
title: "EXPERT DENTAL CARE - Comprehensive Dental Services", description: "Welcome to EXPERT DENTAL CARE. We provide comprehensive dental treatments including teeth cleaning, dental implants, teeth whitening, and more. 20+ years of experience serving happy patients."};
export default function RootLayout({
children,
@@ -19,9 +16,23 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={`${geist.variable} ${geistMono.variable} antialiased`}>
{children}
<html lang="en" suppressHydrationWarning>
<body className={`${dmSans.variable}`}>
<div id="root">
<script
dangerouslySetInnerHTML={{
__html: `
const theme = localStorage.getItem('theme') || 'system';
if (theme === 'dark' || (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
`,
}}
/>
{children}
</div>
<script
dangerouslySetInnerHTML={{
@@ -1392,4 +1403,4 @@ export default function RootLayout({
</body>
</html>
);
}
}