Next.js Discord

Discord Forum

Not found page not working as expected

Unanswered
Shaurya posted this in #help-forum
Open in Discord
layout.tsx:
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
  return (
    <html lang="en">
      <body className={montserrat.className}>
        {children}
      </body>
    </html>
  )
}

not-found.tsx:
export default function NotFound() {
  return (
    <div className={styles.container}>
      ...
    </div>
  )
}
why isn't the font from the layout applied to the not-found page?

1 Reply

anyone?