import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";

const router = createRouter({
  // history: createWebHistory(import.meta.env.BASE_URL),
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "home",
      component: () => import("../views/home/index.vue"),
    },
    {
      path: "/details/:id",
      name: "details",
      component: () => import("../views/details/index.vue"),
    },

    {
      path: "/data",
      name: "data",
      component: () => import("../views/data/index.vue"),
    },
  ],
});
router.beforeEach(async (to, from, next) => {
  next();
});

router.afterEach((to, from, failure) => {});
export default router;
