import Vue from 'vue'
import Router from 'vue-router'
import routes from './routes'

Vue.use(Router)

const router = new Router({
  routes,
  mode: 'history'
})

router.afterEach((to, from, next) => {
  window.scrollTo(0, 0)
});

export default router