From 47bb2cae85e9a16b0076898cd6265512c3adfc3c Mon Sep 17 00:00:00 2001 From: Nikita Kiselev Date: Wed, 16 Jul 2025 07:42:41 +0300 Subject: [PATCH] fix: add route names --- spa/src/router.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/src/router.js b/spa/src/router.js index a075a8c..a95edc3 100644 --- a/spa/src/router.js +++ b/spa/src/router.js @@ -6,9 +6,9 @@ import ProductsList from "./views/ProductsList.vue"; const routes = [ {path: '/', name: 'home', component: Home}, - {path: '/product/:id', component: Product}, - {path: '/categories', component: CategoriesList}, - {path: '/category/:id', component: ProductsList}, + {path: '/product/:id', name: 'product.show', component: Product}, + {path: '/categories', name: 'categories', component: CategoriesList}, + {path: '/category/:id', name: 'category.show', component: ProductsList}, ]; export const router = createRouter({