How to create a different outlet for My admin routes and public routes using tanstack file-based rou
Hi
4 Replies
extended-salmon•2d ago
please provide much more details. what do you mean by "different outlet"?
extended-salmon•2d ago
did you have a look at https://tanstack.com/router/latest/docs/framework/react/guide/authenticated-routes ?
Authenticated Routes | TanStack Router React Docs
Authentication is an extremely common requirement for web applications. In this guide, we'll walk through how to use TanStack Router to build protected routes, and how to redirect users to login if th...
rare-sapphireOP•2d ago
Ok lemme explain what the project I'm building is like
The project will have two routes.
First routes will lead to admin dashboard and other pages within admin.
While the second one will be the public routes anyone can see that routes.
I'm not with my PC currently.
If I get to my pc I will snap and show you what I mean
extended-salmon•7h ago
You probably just want an admin directory under routes: i.e.
routes/admin/index.ts
for your admin routes. Then can have the other stuff either in the main routes
directory or use a pathless directory like: routes/_public
.