I have two URL matches on react js
- '/:countryCode([a-z]{2})/:category/:genre'
- '/:countryCode([a-z]{2})/:category/:genre/:performer'
If it matches with 3 dynamic parameters it redirects to the genre page. If it matches with another one it turns to the performer page.
How can I create a page structure on nextjs. /pages/[countryCode]/[category]/[genre]/[performer] How it will works on both cases
CodePudding user response:
inside genre folder create a file index.js
CodePudding user response:
pages/
[countryCode]/
[category]/
[genre]/
[performer].js //Matches [countryCode]/[category]/[genre]/[performer]
index.js //Matches [countryCode]/[category]/[genre]/