Next.js Discord

Discord Forum

overiding root layout

Unanswered
astro posted this in #help-forum
Open in Discord
i want to have separate layout for my home page and dashboard page, but the homepage's layout seems to mix with dashboard page

dashboard/layout.tsx
 import React from "react";

export default function DashboardLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <div>
      <h1>THis is nav</h1>
      {children}
      <h1>THis is footer</h1>
    </div>
  );
}

2 Replies

Arboreal ant