Next.js Discord

Discord Forum

parallel route match sub folders

Unanswered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
Using parallel sub routes, matched @ folder is redering nothing.

url: http://localhost:3000/dashboards/ranking/apis

src/app/dashboards/layout.tsx:

export default function Layout({ chart }: any) {
return (
<div style={{ display: "flex", flexDirection: "column" }}>
<h3>Chart Content:</h3>
{chart}
</div>
);
}


src/app/dashboards/ranking/@chart/apis/page.tsx:

export default function Page() {
return <h1>Apis Chart</h1>;
}


layout.tsx {chart} is rendering nothing.

4 Replies

Dwarf CrocodileOP
bump
Dwarf CrocodileOP
bump
Dwarf CrocodileOP
bump
Please move "layout.tsx" to "src/app/dashboards/ranking" folder