import Vue from 'vue'
import VueRouter from 'vue-router'

import Home from './view/Home.vue'
import PersonalData from './view/PersonalData.vue'

const routes = [
    {
        path: '/',
        name: 'root',
        redirect: 'home'
    },
    {
        path: '/home',
        component: Home,
        name: 'home'
    },
    {
        path: '/datosPersonales',
        component: PersonalData,
        name: 'personalData'
    }
]

Vue.use(VueRouter)
    /* Produccción */
    // const router = new VueRouter({mode: 'history', routes})
    /* Pruebas */
const router = new VueRouter({ routes })

export default router;