T
TanStack13mo ago
harsh-harlequin

How to add layout to dynamic route?

How can i add layout to dynamic route $projectId? As I added it in settings page.
No description
5 Replies
fascinating-indigo
fascinating-indigo13mo ago
just nest it under a layout as well?
harsh-harlequin
harsh-harlequinOP13mo ago
i made this way
No description
fascinating-indigo
fascinating-indigo13mo ago
hm why not just _layout.$projectId.tsx ?
harsh-harlequin
harsh-harlequinOP13mo ago
where should i place this file?
fascinating-indigo
fascinating-indigo13mo ago
it totally depends what you want to do here a layout file is typically used when you want to apply the same layout for multiple child routes if you don't have that, just place the "layout" into the route file itself

Did you find this page helpful?