I have simple project that when user go to the link like: localhost:3000/course/[id] Then user click join and the url will change to localhost:3000/course/[id]/routeName How can i create folder like that in pages ? Thank you very much!
You want what Next calls 'Multiple dynamic route segments'. Inside of your /pages directory:
course[id][routeName].jsThe path would look like:
/pages/course/[id]/[routeName].js
I figured it out ! If you have the same problem like me !
pages
|-categories
|-[category_slug]
|-index.js
|-product
|-[product_slug].js
That's it!