Next.js Discord

Discord Forum

Client side only routing for certain pages?

Unanswered
MikeyB posted this in #help-forum
Open in Discord
I'm using static export (as I'm not using any of the server features of next.js), it's working great but now I want a route like /admin/<organisation-id>/static-page-x I want it so no matter what <organisation-id> is, it always goes to the same page (which is easily achieved by a CDN configuration) then the JS on that page can make different client-side requests to load the right data. Is this possible?

1 Reply

I think I've got this working just making the main /admin/ page "use client" and dropping a react-router-dom on it, though that probably isn't the best way?