Say I have [lang]/home/page.tsx and fr/mon-article/page.tsx, meaning that the URL "/fr/mon-article" exists only in French, but "/en/home" and "/fr/home" hit the generic "[lang]" route
How can I share a layout efficiently between both? I think I need to create a separate component,but repeat the layout.tsx file in both [lang] and fr folders?
#Equivalent to route groups for an explicit segment + a dynamic segment
5 messages · Page 1 of 1 (latest)
🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord
🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize
✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)
route groups should let you do this! https://nextjs.org/docs/app/building-your-application/routing/route-groups
sorry Eric, i didnt fully read your question. i'll try it out in a demo project
I've ended up crafting a reusable component that I import in 2 layout files