74 lines
1.5 KiB
TypeScript
74 lines
1.5 KiB
TypeScript
import { RouteRecordRaw } from 'vue-router';
|
|
|
|
const routes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/',
|
|
component: () => import('layouts/HomeLayout.vue'),
|
|
redirect: '/',
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'Home',
|
|
component: () => import('pages/HomePage.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/categoria',
|
|
component: () => import('layouts/CategoryLayout.vue'),
|
|
redirect: '/categoria',
|
|
children: [
|
|
{
|
|
path: 'ramos',
|
|
name: 'Category',
|
|
component: () => import('pages/CategoryPage.vue'),
|
|
},
|
|
{
|
|
path: 'plantas',
|
|
name: 'Plantas',
|
|
component: () => import('pages/CategoryPage.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/checkout',
|
|
component: () => import('layouts/CheckoutLayout.vue'),
|
|
redirect: '/checkout',
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'Checkout',
|
|
component: () => import('pages/CheckoutPage.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/product/:id',
|
|
component: () => import('layouts/DefaultLayout.vue'),
|
|
redirect: '/product/:id',
|
|
children: [
|
|
{
|
|
path: '',
|
|
name: 'Product',
|
|
component: () => import('pages/ProductPage.vue'),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '/faq',
|
|
name: 'Faq',
|
|
component: () => import('pages/FaqPage.vue'),
|
|
},
|
|
{
|
|
path: '/contacta',
|
|
name: 'Contacta',
|
|
component: () => import('pages/ContactaPage.vue'),
|
|
},
|
|
{
|
|
path: '/:catchAll(.*)*',
|
|
component: () => import('pages/ErrorNotFound.vue'),
|
|
},
|
|
];
|
|
|
|
export default routes;
|