Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
16 replies
Nicolas

RSC: Shared layout in different paths

Using Next 13 how would someone share the same layout for two pages that are not in the same directory? In this example I want pageOne and pageTwo to have the same layout but I also want login to not have it so I cannot use the layout 1 level higher. I tried re-exporting the layout of pageOne form pageTwo's layout.tsxand it works but it feels a bit weird
Screenshot_2023-09-02_at_22.10.20.png
Was this page helpful?