import router from "./router/index.js";
import NProgress from "nprogress"; 
import 'nprogress/nprogress.css';

router.beforeEach((to, from, next) => {
    NProgress.start();

    if (to.path === '/login') {
        next()
    } else {
        next('/login');
    }
});


router.afterEach((to, from) => {
    NProgress.done();
})
