I would like to have different url(Consumer and Seller) for the same component SingleProduct, which the following codes works well:
const routes = [
{
path: "/:name",
name: "SingleProductSeller",
component: SingleProduct
},
{
path: "/seller/:name",
name: "SingleProductConsumer",
component: SingleProduct,
},
]
Instead of separating into two, is there any other method? For example, is it possible to make an alias with params like following and how to?
{
path: "/:name",
name: "SingleProduct",
component: SingleProduct,
alias: "/seller/:name/",
props: true,
},
Thank you.