Next.js Discord

Discord Forum

route not working

Answered
CHEEMDA MAN posted this in #help-forum
Open in Discord
i'm using this folder struture shown in image but in browser it is showing 404
This page could not be found.
Answered by Sun bear
Do you use app router? In case yes then it should be page.jsx
View full answer

16 Replies

appearing this
Sun bear
Do you use app router? In case yes then it should be page.jsx
Answer
@Sun bear Do you use app router? In case yes then it should be `page.jsx`
ah.. okay so we can't put dynamic name to a file
@CHEEMDA MAN ah.. okay so we can't put dynamic name to a file
Sun bear
Exactly. Only folders can be dynamic
@Sun bear Exactly. Only folders can be dynamic
okay then i have to put it in 2 dynamic folder and after that when i'm trying fetch the id and title from url it shows empty
Sun bear
@CHEEMDA MAN okay then i have to put it in 2 dynamic folder and after that when i'm trying fetch the id and title from url it shows empty
Sun bear
Can you show the code of page jsx and the directory where it is
@Sun bear Can you show the code of page jsx and the directory where it is
yea here it is
@CHEEMDA MAN yea here it is
Sun bear
Try params.itinerarytype so the name of the dynamic folders
issue solved
ah can you give refference regrading fetch and find data from api in page.jsx without making it client side