Next.js Discord

Discord Forum

Same page content, two different layouts

Unanswered
Matt posted this in #help-forum
Open in Discord
I'm building an entirely separate layout for the mobile version of my site, but some of the page content (e.g. the forgot password page) will be the same.

Is the best way to just make two separate layout trees and separate out everything in the page into its own component that is included in two page files or is there a way to conditionally render a different layout for the same page?

1 Reply

bump