[NextJS] Layout.tsx

Jimin·2024년 4월 24일
0

Next.JS

목록 보기
9/13

Layout.tsx

Layout.tsx 는 매 페이지에 존재할 수 있다.

  • main Layout.tsx
export default function Layout({children,}: Readonly<{ children: React.ReactNode;}>) {
  return (
    <html lang="en">
      <body>
        <Navigation />
        {children}
      </body>
    </html>
  );
}
  • 다른페이지 Layout.tsx

export default function AboutUsLayout({children,}: Readonly<{ children: React.ReactNode;}>) {
    return (
        <div>
            {children}
            &copy; Next JS is great!
        </div>
    );
}
profile
https://github.com/Dingadung

0개의 댓글