gamebrary/src/router/index.js

44 lines
1 KiB
JavaScript
Raw Normal View History

2018-10-19 05:15:28 +00:00
import Vue from 'vue';
import Router from 'vue-router';
import ShareList from '@/pages/ShareList/ShareList';
import GameDetail from '@/pages/GameDetail/GameDetail';
2019-01-24 06:15:00 +00:00
import GameBoard from '@/pages/GameBoard/GameBoard';
import Auth from '@/pages/Auth/Auth';
import Platforms from '@/pages/Platforms/Platforms';
2018-10-19 05:15:28 +00:00
Vue.use(Router);
export default new Router({
routes: [
{
2018-11-21 02:43:10 +00:00
path: '/s/:userId/:listName',
name: 'shareList',
2018-10-19 05:15:28 +00:00
component: ShareList,
},
{
name: 'game-detail',
path: '/g/:id/:slug',
component: GameDetail,
},
{
name: 'platforms',
path: '/platforms',
component: Platforms,
2018-11-05 02:27:14 +00:00
meta: {
title: 'Platforms',
},
},
2019-01-24 06:15:00 +00:00
{
path: '/auth',
name: 'auth',
component: Auth,
},
2018-10-19 05:15:28 +00:00
{
path: '/',
2019-01-24 06:15:00 +00:00
name: 'game-board',
component: GameBoard,
2018-10-19 05:15:28 +00:00
},
2019-01-24 06:15:00 +00:00
{ path: '*', component: Auth },
2018-10-19 05:15:28 +00:00
],
});