shadcn-nextjs
shadcn-nextjs copied to clipboard
"metadata cannot be used in layout.tsx" error is occurring.
First of all, thank you for creating such helpful content. I appreciate it. However, there seems to be an issue in the source code that could lead viewers who visit your GitHub to encounter errors. I believe that in the layout.tsx file, removing 'use client' and changing the import statement from import { ThemeProvider } from "next-themes"; to import { ThemeProvider } from "@/components/ThemeProvider"; is necessary to enable the use of metadata.