-
Notifications
You must be signed in to change notification settings - Fork 7
/
router.ts
46 lines (40 loc) · 940 Bytes
/
router.ts
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
39
40
41
42
43
44
45
46
import { createRouter, createWebHashHistory, type RouteRecordRaw } from "vue-router";
import ActivityFeedView from "@/views/ActivityFeedView.vue";
import ProjectView from "@/views/project/ProjectView.vue";
export enum ROUTE_NAMES {
VIEW_BUILDER = "view-builder",
COMPONENTS = "components",
}
const routes: RouteRecordRaw[] = [
{
path: "/",
name: "view-builder",
component: ProjectView,
meta: {
icon: "icon-pie-chart",
},
},
{
path: "/activity",
name: "activity-feed",
component: ActivityFeedView,
meta: {
icon: "icon-list-sparkle",
},
},
];
if (import.meta.env.DEV) {
routes.push({
path: "/components",
name: "components",
component: () => import("./views/ComponentsView.vue"),
meta: {
icon: "icon-gift",
},
});
}
const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
routes,
});
export default router;