posts/[id]/page.tsx
Unanswered
Serrano Bulldog posted this in #help-forum
Serrano BulldogOP
Hello this is maybe a stupid question but I have some test posts in a data.js file in a Next.js 14 project that I am rendering in a list but I would like to access an individual post with the posts/[id]/page.tsx structure, when clicking on a post link its redirected to page.tsx and the url has the post id (posts/1/) but I can't get the corresponding post data to display.
Is there a simple way I haven't thought of?
Is there a simple way I haven't thought of?
3 Replies
Blue orchard bee
Do you have any sample code on the page.tsx file?
That could help track the issue
Barbary Lion
Did you iterate over the list of posts and create a path for each post?