44 lines
1019 B
TypeScript
44 lines
1019 B
TypeScript
import { createRouter, createWebHistory } from 'vue-router'
|
|||
|
|
|
||
|
|
const router = createRouter({
|
||
|
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||
|
|
routes: [
|
||
|
|
{
|
||
|
|
path: '/',
|
||
|
|
name: 'home',
|
||
|
|
component: () => import('../views/HomeView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/products',
|
||
|
|
name: 'products',
|
||
|
|
component: () => import('../views/ProductListView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/product/:id',
|
||
|
|
name: 'product-detail',
|
||
|
|
component: () => import('../views/ProductDetailView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/cart',
|
||
|
|
name: 'cart',
|
||
|
|
component: () => import('../views/CartView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/profile',
|
||
|
|
name: 'profile',
|
||
|
|
component: () => import('../views/ProfileView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/wishlist',
|
||
|
|
name: 'wishlist',
|
||
|
|
component: () => import('../views/WishlistView.vue')
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/settings',
|
||
|
|
name: 'settings',
|
||
|
|
component: () => import('../views/SettingsView.vue')
|
||
|
|
}
|
||
|
|
]
|
||
|
|
})
|
||
|
|
|
||
|
|
export default router
|