Next.js Discord

Discord Forum

error in page routing

Answered
Cape lion posted this in #help-forum
Open in Discord
Cape lionOP
Error: The default export is not a React Component in page: "/"

i am trying to route "/" from page.tsx inside (dashboard) folder but it is giving the error
Answered by Himalayan
You are not exporting the layout?
View full answer

6 Replies

Cape lionOP
i tried putting it inside p tag and it still gives the same error
layout.tsx
@B33fb0n3 what's inside your layouts.tsx? Can you try to put your *dashboard* text in a <p> Tag?
Cape lionOP
can it be because of two folders in ()
(dashboard) and (auth)
Himalayan
You are not exporting the layout?
Answer
@Himalayan You are not exporting the layout?
Cape lionOP
thanks it worked. i forgot to export the layout