Update src/app/layout.tsx

This commit is contained in:
2026-03-09 08:37:23 +00:00
parent b42e766676
commit fb34fc3aec

View File

@@ -1,19 +1,9 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ServiceWrapper } from "@/providers/service/ServiceWrapper";
import { Tag } from "@/components/utils/Tag";
const geist = Geist({
variable: "--font-geist-sans", subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono", subsets: ["latin"],
});
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: "Portfolio", description: "Creative portfolio showcasing design excellence"};
title: 'Portfolio',
description: 'Portfolio website',
};
export default function RootLayout({
children,
@@ -21,29 +11,8 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${geist.variable} ${geistMono.variable} antialiased`}
suppressHydrationWarning
>
<ServiceWrapper>
<Tag />
{children}
</ServiceWrapper>
<script
dangerouslySetInnerHTML={{
__html: `
try {
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark')
} else {
document.documentElement.classList.remove('dark')
}
} catch (e) {}
`,
}}
/>
<html lang="en">
<body>{children}
<script
dangerouslySetInnerHTML={{
__html: `