Next.js Discord

Discord Forum

Parallel route nested in page contents

Unanswered
Lê Duy Quang posted this in #help-forum
Open in Discord
They are showing this as an illustration for parallel routes, but how are the slots being rendered within the page's content there?

6 Replies

American black bear
They are rendered inside the layout as shown in the code example of the screenshot. So you have to have a layout.js file on the same level as the parallel routes that receives the name of the parallel route folders as params, which then can be rendered inside of it.
That example arranges the slots in the layout, whereas in that image the layout code simply returns a flat list, with the children seemingly being able to nest team and analytics within itself.
The answer might be that is just a low-fidelity illustration in which case I would be OK too.
that's just css you can adjust in the layout.tsx
@Ray that's just css you can adjust in the layout.tsx
Not sure how that would work.