Moving Header to layout.tsx
This commit is contained in:
@@ -2,6 +2,8 @@ import type { Metadata } from "next";
|
|||||||
import { Geist, Geist_Mono } from "next/font/google";
|
import { Geist, Geist_Mono } from "next/font/google";
|
||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
|
|
||||||
|
import { Header } from "@/components/ui/header";
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
variable: "--font-geist-sans",
|
variable: "--font-geist-sans",
|
||||||
subsets: ["latin"],
|
subsets: ["latin"],
|
||||||
@@ -27,6 +29,8 @@ export default function RootLayout({
|
|||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||||
>
|
>
|
||||||
|
<Header/>
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import { Header } from "@/components/ui/header";
|
|||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Header/>
|
|
||||||
|
|
||||||
<main className="p-4">
|
<main className="p-4">
|
||||||
<h1 className="text-2xl font-bold">Welcome to the Test Page</h1>
|
<h1 className="text-2xl font-bold">Welcome to the Test Page</h1>
|
||||||
<p className="mt-2">This is a test page to display the new header component.</p>
|
<p className="mt-2">This is a test page to display the new header component.</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user