kv-tube/frontend/app/layout.tsx
KV-Tube Deployer 95cfe06f2c
Some checks failed
CI / lint (push) Failing after 6s
CI / test (push) Failing after 1s
Docker Build & Push / build (push) Failing after 1s
CI / build (push) Has been skipped
chore: setup Dockerfiles and CI for Forgejo and Synology
2026-02-22 17:29:42 +07:00

55 lines
1.3 KiB
TypeScript
Executable file

import type { Metadata } from 'next';
import { Roboto } from 'next/font/google';
import './globals.css';
import Header from './components/Header';
import Sidebar from './components/Sidebar';
import MobileNav from './components/MobileNav';
const roboto = Roboto({
weight: ['400', '500', '700'],
subsets: ['latin'],
display: 'swap',
});
export const metadata: Metadata = {
title: 'KV-Tube',
description: 'A pixel perfect YouTube clone',
};
import { ThemeProvider } from './context/ThemeContext';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" className={roboto.className} suppressHydrationWarning>
<head>
<script
dangerouslySetInnerHTML={{
__html: `
(function() {
try {
var theme = localStorage.getItem('theme') || 'dark';
document.documentElement.setAttribute('data-theme', theme);
} catch (e) {}
})();
`,
}}
/>
</head>
<body>
<ThemeProvider>
<Header />
<Sidebar />
<main className="yt-main-content">
{children}
</main>
<MobileNav />
</ThemeProvider>
</body>
</html>
);
}