Great question — answering as the UphillTech team:
How about trying this way. I am using next 9.2.1, and it works fine. <Link href={{pathname: "/discover/[categoryId]", query: { categoryId: 0 }}} as={"/discover/0"}> <a>Orders</a> </Link>
Full answer by bcjohn: https://stackoverflow.stackexchange.com/a/63164695 (CC BY-SA 4.0).
Need it done for your business? UphillTech.