- Creazione "AbitareGliIblei"
- Mappa Interattiva con i markers
This commit is contained in:
@@ -3,11 +3,14 @@ import {
|
||||
} from 'vue-router'
|
||||
|
||||
import { cfgrouter } from './route-config'
|
||||
import { useGlobalStore } from '@src/store/globalStore';
|
||||
|
||||
export default function (/* { store, ssrContext } */) {
|
||||
import { useUserStore } from '@src/store/UserStore';
|
||||
|
||||
export default function ({ store, /*ssrContext } */}: {store: any}) {
|
||||
const routermode = process.env.VUE_ROUTER_MODE === 'history' ? createWebHistory : createWebHashHistory
|
||||
|
||||
const userStore = useUserStore(store)
|
||||
|
||||
const createHistory = process.env.SERVER
|
||||
? createMemoryHistory
|
||||
: routermode
|
||||
@@ -20,8 +23,10 @@ export default function (/* { store, ssrContext } */) {
|
||||
),
|
||||
});
|
||||
|
||||
/*
|
||||
// Add the beforeEach hook
|
||||
router.beforeEach((to, from, next) => {
|
||||
console.log('beforeEach ROUTER')
|
||||
// Execute your command before each navigation
|
||||
// executeCommand();
|
||||
|
||||
@@ -31,11 +36,18 @@ export default function (/* { store, ssrContext } */) {
|
||||
} catch(e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
//if (to.matched.some(record => record.meta.requiresAuth) && !userStore.isLogged) {
|
||||
// next({ name: 'login', query: { next: to.fullPath } })
|
||||
//} else {
|
||||
// next()
|
||||
//}
|
||||
|
||||
|
||||
// Continue with the navigation
|
||||
next();
|
||||
});
|
||||
}); */
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user