Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selectively use _layouts #189

Open
arifluthfi16 opened this issue Jan 16, 2025 · 0 comments
Open

Selectively use _layouts #189

arifluthfi16 opened this issue Jan 16, 2025 · 0 comments

Comments

@arifluthfi16
Copy link

When defining multiple _layout.tsx files in a parent-child folder structure (e.g., routes/_layout.tsx and routes/dashboard/_layout.tsx), the layouts are automatically nested, resulting in double-layered layouts instead of using only the child’s layout.

routes/
  _layout.tsx         // Parent layout
  dashboard/
    _layout.tsx       // Child layout
    index.tsx

the desired result: the index.tsx uses the closest child _layout.tsx

is there any workaround for this scenario?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant