Update src/app/layout.tsx
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Poppins } from "next/font/google";
|
||||
import "./styles/variables.css";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
import ServiceWrapper from "@/components/service/ServiceWrapper";
|
||||
import { Tag } from "@/components/ui/tag";
|
||||
|
||||
const poppins = Poppins({
|
||||
variable: "--font-poppins", subsets: ["latin"],
|
||||
weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"],
|
||||
const geistSans = Geist({
|
||||
variable: "--font-geist-sans", subsets: ["latin"],
|
||||
});
|
||||
|
||||
const geistMono = Geist_Mono({
|
||||
variable: "--font-geist-mono", subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "PetrolHeads - Car Enthusiasts Community", description: "Unite with car lovers and petrolheads. Discover the ultimate destination for automotive passion, performance, and community."};
|
||||
title: "CarLed - Petrolhead Community", description: "Discover the passion and innovation behind CarLed, celebrating the petrolhead community."};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
@@ -18,25 +22,14 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body className={`${poppins.variable} antialiased`}>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<ServiceWrapper>
|
||||
<Tag />
|
||||
{children}
|
||||
</ServiceWrapper>
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
(function() {
|
||||
try {
|
||||
const theme = localStorage.getItem('theme');
|
||||
if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
} catch (e) {}
|
||||
})()
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
<script async src="https://cdn.splitbee.io/sb.js"></script>
|
||||
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
@@ -1408,11 +1401,3 @@ export default function RootLayout({
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
function ServiceWrapper({ children }: { children: React.ReactNode }) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
function Tag() {
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user