40 lines
754 B
JavaScript
40 lines
754 B
JavaScript
import Vue from 'vue';
|
|
import VueRouter from 'vue-router';
|
|
|
|
import Home from '../components/home/home.vue';
|
|
import Release from '../components/release/release.vue';
|
|
import Actor from '../components/actor/actor.vue';
|
|
import NotFound from '../components/errors/not-found.vue';
|
|
|
|
Vue.use(VueRouter);
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
component: Home,
|
|
},
|
|
{
|
|
path: '/scene/:releaseId',
|
|
component: Release,
|
|
},
|
|
{
|
|
path: '/movie/:releaseId',
|
|
component: Release,
|
|
},
|
|
{
|
|
path: '/actor/:actorSlug',
|
|
component: Actor,
|
|
},
|
|
{
|
|
path: '*',
|
|
component: NotFound,
|
|
},
|
|
];
|
|
|
|
const router = new VueRouter({
|
|
mode: 'history',
|
|
routes,
|
|
});
|
|
|
|
export default router;
|