Add header and themes

This commit is contained in:
2024-05-08 22:50:44 +04:00
parent 9a3d900d1b
commit a634c194fe
19 changed files with 255 additions and 44 deletions

View File

@@ -1,12 +1,14 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "next-themes";
import { Header } from "@/widgets/header";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: ".Torrent",
description: ".torrent file sharing service",
};
export default function RootLayout({
@@ -15,8 +17,14 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en">
<body className={inter.className}>{children}</body>
// suppressHydrationWarning only for html for theme support
<html lang="ru" suppressHydrationWarning>
<body className={inter.className}>
<ThemeProvider enableSystem={false} defaultTheme="light">
<Header />
{children}
</ThemeProvider>
</body>
</html>
);
}