Add `test` prefix to all routes in particular group (route interception, optional dynamic routes)
Unanswered
Wendell Misiedjan posted this in #help-forum
We've an dashboard under the
Example:
/admin/.... path, we want to implement a url based testMode toggle / state by prefixing /admin/test/.... to all paths but within the same 'group' in Next.js, whats the best way to achieve this? This should work similar as the Stripe test mode toggle, any tips?Example:
/admin/test/tickets - only shows test tickets/admin/tickets - real tickets2 Replies
Instead of modifying the segment configuration, could you just accept a param to put it into test mode?
/admin/tickets?mode=testThat would be much easier to manage in the longrun imo