First component with DaisyUI and Nextjs gives runtime error

New to nextjs 13. Have only been using Nextjs 12 and less in production. Initialized a nextjs 13 for my side-project. DaisyUI was my UI library of choice. Still not very clear about how things work with Next13, kept going through the docs but not too far. Tried adding a navbar from DaisyUI both as a named export from app/components/Navbar.tsx and directly into the default layout file from Next13 and all of a sudden I am getting a runtime error. Can anyone help me with what's going on?
No description
No description
2 Replies
BootesVoid
BootesVoid14mo ago
Create your own component say component.tsx, Import the Daisy ui component and return it and use the "use client" directive on top of the file. And use this component throughout Oh wait this specific error is caused because your div tag containing the daisyui text is outside the body tag.
sky_kryst
sky_kryst14mo ago
Oh dang it, thanks
Want results from more Discord servers?
Add your server