KOSLA
TTCTheo's Typesafe Cult
•Created by KOSLA on 1/29/2024 in #questions
Optional Dynamic Routing Problem
I have the following routing directory structure:
-[locale]
-(home)
page.tsx
-products
page.tsx
now i cant get to /en/products with my code knowing "en" is the "locale" param
i want to implement an affiliate system in the same project
so the affiliate will have the links generated by them be for example:
/affiliate-slug/en/products
i want to add an optional param before locale having the affiliate slug or having no slug at all
i am using next 13.5
i tried using [[...slug]] way of optional dynamic routing in the docs but i get the error of "Optional route parameters are not yet supported"
any ideas of tips?
6 replies