index.js 765 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { createRouter, createWebHistory } from 'vue-router';
  2. import HomeView from '@/views/home.vue';
  3. import GamesView from '@/views/games.vue';
  4. import LeaguesView from '@/views/leagues.vue';
  5. import LocalesView from '@/views/locales.vue';
  6. const router = createRouter({
  7. history: createWebHistory(import.meta.env.BASE_URL),
  8. routes: [
  9. {
  10. path: '/',
  11. redirect: '/home'
  12. },
  13. {
  14. path: '/home',
  15. name: 'home',
  16. component: HomeView
  17. },
  18. {
  19. path: '/games',
  20. name: 'games',
  21. component: GamesView
  22. },
  23. {
  24. path: '/leagues',
  25. name: 'leagues',
  26. component: LeaguesView
  27. },
  28. {
  29. path: '/locales',
  30. name: 'locales',
  31. component: LocalesView
  32. },
  33. ],
  34. });
  35. export default router;