Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a Next.js route with /users/:id/verify/:token

I am trying to create a component that renders in a Next.js app at path /users/:id/verify/:token.

I understand how to create a route for /users/:id

But I cant seem to understand how to add another /verify/:token onto the end of that route and show something

currently I have my pages set up like this

enter image description here

like image 636
KingJoeffrey Avatar asked Dec 05 '25 20:12

KingJoeffrey


1 Answers

With dynamic routes You can use folders to catch all routes, like this.

enter image description here

then the route /users/12/verify/99 would give you id=12 and token=99 in useRouter

Was it something like that you were after?

like image 193
O.Malmgren Avatar answered Dec 08 '25 18:12

O.Malmgren