I am trying to make my react-router work. Until now, I only had simple routes like: /login, /logout, /admin. I have a couple of routes below my /admin route like /admin/users, /admin/groups
Now I would like to make it so I can render a component on a route like this: /admin/groups/modify/:groupID. Since the /admin/groups work just fine, I thought I could just write /admin/groups/modify/:groupID, but it doesn't work that way.
So why does /admin/groups work, but not /admin/groups/modify/:groupID? Is it because I have the parameters?
My router looks like this:
<Router>
<Navbar />
<Switch className = "container-fluid">
<Route exact path = "/" component = {Dashboard} />
<Route exact path = "/login" component = {Login} />
<Route exact path = "/logout" component = {Logout} />
<Redirect from = "/register/" to = "/"/>
<Route exact path = "/register/:token" component = {Register} />
<Route exact path = "/groupview" component = {GroupView} />
<Route exact path = "/admin" component = {AdminDashboard} />
<Route exact path = "/admin/users" component = {AdminUsers} />
<Route exact path = "/admin/groups" component = {AdminGroups} />
<Route exact path = "/admin/groups/modify/:groupID" component = {AdminGroupsModify} />
<Route exact path = "/admin/regTokens" component = {AdminRegTokens} />
</Switch>
</Router>