mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(layout): integrate mode toggle in layout and simplify home page structure
This commit is contained in:
parent
286a4739c3
commit
96c946a2ca
@ -1,5 +1,6 @@
|
||||
import "./globals.css";
|
||||
import type { Metadata } from "next";
|
||||
import { ModeToggle } from "@/components/mode-toggle";
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@ -14,14 +15,19 @@ export default function RootLayout({
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body className="antialiased">
|
||||
<body className="h-screen flex flex-col antialiased">
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
{children}
|
||||
<header className="h-14 flex items-center justify-end px-8 border-b">
|
||||
<ModeToggle />
|
||||
</header>
|
||||
<main className="flex-1">
|
||||
{children}
|
||||
</main>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,15 +1,5 @@
|
||||
import CodeEditor from "@/components/code-editor";
|
||||
import { ModeToggle } from "@/components/mode-toggle";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="h-screen flex flex-col">
|
||||
<header className="h-14 flex items-center justify-end px-8 border-b">
|
||||
<ModeToggle />
|
||||
</header>
|
||||
<div className="flex-1">
|
||||
<CodeEditor />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return <CodeEditor />;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user