DEV Community

Matt
Matt

Posted on

I need some help with layout and link (Portfolio in React)

Hi everyone,

I'm currently learning React and Nextjs, and I've taken a tutorial on creating a portfolio.
The tutorial in question only focuses on the HomePage, and I'm having trouble creating the other pages.
As the "My projects" screen shows, I'd like to create 4 new pages ( project1.tsx/project2.tsx...) to present my 4 projects in detail. (screen 1)
I've created a link with the props id so that each project container can be clicked on and linked to the pages for each project (screen 2 & 3).
The pages in question (project1.tsx/project2.tsx..) are located in my app folder, which also contains my layout (layout.tsx) and my homepage (page.tsx)(screen 3 & 4)
The problem: When I click on each of the 4 containers, I'm redirected to the correct page address ( /project1 /project2...) but it doesn't load and the content doesn't appear (screen 5 & 6).
I don't know if it's a problem with my layout or the link.
Could you help me?

Thanks for taking the time to read me :)
Have a nice evening!

Image description
Image description
Image description
Image description
Image description
Image description

Top comments (2)

Collapse
 
redbeardjunior profile image
RedbeardJunior • Edited

Because you have them in the app directory, app can handle only the front page.

create a folder (group) and add for every page a folder like project1 and add the page in the folder call the page page.jsx or page.tsx

Image description

Collapse
 
redbeardjunior profile image
RedbeardJunior

Let me know if you need more help !