45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import { createRouter, createWebHashHistory } from "vue-router";
|
|
import type { RouteRecordRaw } from "vue-router";
|
|
|
|
const routes: Array<RouteRecordRaw> = [
|
|
{
|
|
path: "/:catchAll(.*)?",
|
|
name: "Home",
|
|
component: () => import("../views/Home.vue"),
|
|
children: [
|
|
{
|
|
path: "",
|
|
name: "EnergyChart",
|
|
component: () => import("../views/EnergyChart.vue"),
|
|
},
|
|
{
|
|
path: "elecPricing",
|
|
name: "elecPricing",
|
|
component: () => import("../views/EnergyPricing.vue"),
|
|
},
|
|
{
|
|
path: "monthlyReport",
|
|
name: "monthlyReport",
|
|
component: () => import("../views/MonthlyReport.vue"),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: "/register",
|
|
name: "Register",
|
|
component: () => import("../views/Register.vue"),
|
|
},
|
|
// {
|
|
// path: "/:catchAll(.*)",
|
|
// name: "404",
|
|
// component: () => import("../views/404.vue"),
|
|
// },
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(import.meta.env.BASE_URL),
|
|
routes,
|
|
});
|
|
|
|
export default router;
|