0



I have a question
web url I want is
area/Texas/region/houston or area/Texas/region/dallas
area and region is static, Texas and houston can change
but I don't know how to make page direction in nextJS
pages
 ㄴ area
  ㄴ[area].js
  ㄴregion
   ㄴ[region].js

this distructure not working because [area] page and region folder in one folder together

Let me know how I make distructure!!
Help me...

1 Answer 1

1

You can also [dynamicname] directories, and the index.js inside the directory will be used. So can have something like this.

pages
 ㄴ area
   ㄴ [areaname]
    ㄴindex.js - this one will run in a /area/Texas or /area/California request.
    ㄴregion
     ㄴ[region].js

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.