Skip to content

[Beginner] Authorized route with folder bugs out? #1587

Answered by SeanCassiere
Ookamini95 asked this question in Q&A
Discussion options

You must be logged in to vote

Would probably need an understanding of the URLs you are looking build, but in essence this is what should be getting created.

src/routes

index.tsx - resolves to localhost:3000/
_private.tsx - layout route configuration
_private/
    _auth.tsx - layout route configuration
    _auth.profile.tsx - resolves to localhost:3000/profile

The _private.tsx and _auth.tsx should have whatever logic and components configured in them, with an <Outlet /> rendered where the child route should be shown.

All in all, only the following URLs would be created: localhost:3000/ and localhost:3000/profile.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ookamini95
Comment options

Answer selected by Ookamini95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants