1
0
Fork 0
mirror of https://github.com/CorentinTh/it-tools.git synced 2025-07-24 07:39:36 +02:00
it-tools/src/router.ts
2022-04-04 00:24:45 +02:00

18 lines
549 B
TypeScript

import { layouts } from './layouts/index';
import { createRouter, createWebHistory } from 'vue-router';
import HomePage from './pages/Home.page.vue';
import { tools } from './tools';
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'home',
component: HomePage,
},
...tools.map(({ path, name, component, ...config }) => ({ path, name, component, meta: { isTool: true, layout: layouts.toolLayout, name, ...config } })),
],
});
export default router;