aboutsummaryrefslogtreecommitdiff
path: root/src/router.ts
blob: 101fe99e50348c6bdb1c4b3e2f6f53a76a3c53d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import type { RouteRecordRaw } from 'vue-router';
import HomePage from './pages/Home.page.vue';
// import { layouts } from './layouts/index';
import NotFound from './pages/404.page.vue';
// import { tools } from './tools';

// const toolsRoutes = tools.map(({ path, name, component, ...config }) => ({
//   path,
//   name,
//   component,
//   meta: { isTool: true, layout: layouts.toolLayout, name, ...config },
// }));
// const toolsRedirectRoutes = tools
//   .filter(({ redirectFrom }) => redirectFrom && redirectFrom.length > 0)
//   .flatMap(
//     ({ path, redirectFrom }) => redirectFrom?.map((redirectSource) => ({ path: redirectSource, redirect: path })) ?? [],
//   );
//
// console.log({ toolsRoutes, toolsRedirectRoutes });

const routes: RouteRecordRaw[] = [
  // ...toolsRoutes,
  // ...toolsRedirectRoutes,
  {
    path: '/',
    name: 'home',
    component: HomePage,
  },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('./pages/About.vue'),
  // },

  // { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound },
];

export { routes };