시스템을 추구하는 것은 나쁜걸까? #6

Merged
imnyang merged 2 commits from nextjs into main 2025-10-29 21:38:25 +09:00
2 changed files with 24 additions and 3 deletions

View file

@ -1,4 +1,6 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import { ThemeProvider } from "@/components/theme-provider"
import "./globals.css"; import "./globals.css";
import "./scrollbar.css"; import "./scrollbar.css";
import SUPERCOMMAND from "@/components/SUPERCOMMAND"; import SUPERCOMMAND from "@/components/SUPERCOMMAND";
@ -14,10 +16,18 @@ export default function RootLayout({
children: React.ReactNode; children: React.ReactNode;
}>) { }>) {
return ( return (
<html lang="ko"> <html lang="en" suppressHydrationWarning>
<head />
<body className="antialiased"> <body className="antialiased">
{children} <ThemeProvider
<SUPERCOMMAND /> attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
<SUPERCOMMAND />
</ThemeProvider>
</body> </body>
</html> </html>
); );

View file

@ -0,0 +1,11 @@
"use client"
import * as React from "react"
import { ThemeProvider as NextThemesProvider } from "next-themes"
export function ThemeProvider({
children,
...props
}: React.ComponentProps<typeof NextThemesProvider>) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}