traxxx/assets/js/router.js

56 lines
1.1 KiB
JavaScript
Raw Normal View History

import Vue from 'vue';
import VueRouter from 'vue-router';
import Home from '../components/home/home.vue';
import Release from '../components/release/release.vue';
import Site from '../components/site/site.vue';
import Network from '../components/network/network.vue';
import Actor from '../components/actor/actor.vue';
import NotFound from '../components/errors/404.vue';
Vue.use(VueRouter);
const routes = [
{
path: '/',
component: Home,
name: 'home',
},
{
path: '/scene/:releaseId',
component: Release,
name: 'release',
},
{
path: '/movie/:releaseId',
component: Release,
name: 'release',
},
{
path: '/actor/:actorSlug',
component: Actor,
name: 'actor',
},
{
path: '/site/:siteSlug',
component: Site,
name: 'site',
},
{
path: '/network/:networkSlug',
component: Network,
name: 'network',
},
{
path: '*',
component: NotFound,
},
];
const router = new VueRouter({
mode: 'history',
routes,
});
export default router;