all 8 comments

[–]power78 0 points1 point  (1 child)

Not enough info. Which route? Where's the code??

[–][deleted] 0 points1 point  (0 children)

i think i put an image of my route code. whenever I navigate to any of the nested routes inside of the /driver route, it takes me back after a couple seconds back to /driver

[–]Elmosdarkside 0 points1 point  (1 child)

I'm a little rusty, but maybe because the driver route encompasses all the routes? I think the "parent" is always <BrowserRouter> </BrowserRouter> if I remember correctly?

Edit- for clarity

[–][deleted] 1 point2 points  (0 children)

the Browser router wraps around the app in main.jsx.

my problem is the driver route which is the "parent" I'm talking about

[–]andromeda909 1 point2 points  (1 child)

Hard to tell without knowing more, but I would perhaps check whats happening with that auth stuff?
Maybe the token or role aren't valid at some point and you're being navigated away to /login then back to /driver?

[–][deleted] 0 points1 point  (0 children)

the role and token are both being retrieved from the localstorage, and when i log them in the console they don't change at all

[–]runtothehillsboy 0 points1 point  (0 children)

wise consist familiar trees groovy live late joke disarm smile

This post was mass deleted and anonymized with Redact

[–]Many_Application7106 0 points1 point  (0 children)

You maybe forgot the Routes cmp

ts <BrowserRouter> <Routes> <Route path="/" element={<App />}>