Authenticated directory routes - unable to get it to work
We had file based routing for the longest time. Now with the ever increasing amount of new routes we'd like to refactor into some directories instead. For a basic example we used to have
With
Now turning it into directories
Moving the authentication logic to
With
_auth.tsx containing authentication logic which handles redirects and such. Now turning it into directories
Moving the authentication logic to
/_auth/index.tsx and navigating to the dashboard it skips the logic and goes straight to the dashboard. Is there a way on how all the child directories in /_auth/ must go through that logic before going to their components?