import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Login from '@/views/auth/Login.vue'
import Register from '@/views/auth/Register.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/home',
    name: 'home',
    component: HomeView
  }
  ,{
    path:'',
    redirect:'/home'
  },
  {
    path:'/auth',
    component: Login,
    children: [
      {
        path:'login',
        component: Login
      },
      {
        path:'register',
        component: Register
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router