Next.js Discord

Discord Forum

App directory layout query

Answered
Pacific cod posted this in #help-forum
Open in Discord
Avatar
Pacific codOP
suppose this is my project structure and i want home and movies to have a shared layout (after logging in ) and signup to have a different layout. how do i go about this? i don't want change in routing structure so I cannot push home and movies to a newer folder inside app/ because that will create a different routing structure. i want routing to go like - xyz.com (signup), xyz.com/home(user homepage), xyz.com/movies(user movies page).

.
└── src/
    └── app/
        ├── home
        ├── movies
        ├── signup
        ├── layout.tsx
        └── page.tsx

4 Replies

Avatar
Pacific codOP
@Giant Chinchilla where would the shared layout.tsx file for home and movies go here? the layout.tsx already present in app/ is for all the routes present including signup so i cant use that.
Avatar
Rizky 🙃
Answer
Avatar
Pacific codOP
so i can create a (user) group and chuck home and movies folder into that? yeah i think this is what i wanted. thanks
Avatar
Rizky 🙃
yeah nice, you had everything looking like you wanted it, but im guessing you weren't 100% sure about it... glad to help