{"size": 784, "ext": "js", "max_stars_repo_path": "src/router/router.js", "max_stars_repo_name": "WaitBroWhat/Kahoot-Rockss", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/router/router.js", "max_issues_repo_name": "WaitBroWhat/Kahoot-Rockss", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/router/router.js", "max_forks_repo_name": "WaitBroWhat/Kahoot-Rockss", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.6666666667, "max_line_length": 80, "alphanum_fraction": 0.5714285714}
import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: () => import("../views/Home.vue"),
  },
  {
    path: "/terms",
    name: "Terms & Conditions",
    component: () => import("../views/Terms.vue"),
  },
  {
    path: "/privacy",
    name: "Privacy Policy",
    component: () => import("../views/Privacy.vue"),
  },
  {
    path: "*",
    redirect: { path: "/" },
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

const DEFAULT_TITLE = "Kahoot Rocks - The only working Kahoot auto answer hack";
router.afterEach((to) => {
  Vue.nextTick(() => {
    document.title = to.meta.title || DEFAULT_TITLE;
  });
});

export default router;
