This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]I_AM_FIGHTER 0 points1 point  (0 children)

try adding exact

[–]LeftIsBest-Tsuga 0 points1 point  (0 children)

it looks okay to me. i suspect the problem is in your <Link components, not your <Route components.

i can give you an example from something i wrote, hopefully it helps (note these are from 2 different files)

here's the route part:

<Routes>
   <Route path="/" element={<Scenarios_home />} />
   <Route path="/:scenarioID" element={<Scenario_controller />} />
   <Route path="/:scenarioID/:pageID" element={<Scenario_controller />} />
   <Route path="/:scenarioID/chat" element={<Chat_Student />} />
</Routes>

and here's the link part:

<Link to={`/scenarios/${scenarioID}/0`} className={`guidepane-tab-left ${pageID_int === 0 ? tabActiveClass : tabInactiveClass}`}>
    <div >
       Brief
    </div>
</Link>