HI all I am trying to import my store into my Vuex Route-Gard.
router/auth-guard.js
import {store} from '../store'
export default (to, from, next) => {
if (store.getters.user) {
next()
} else {
next('/login')
}
}
store/index.js
import {store} from '../store'
export default (to, from, next) => {
if (store.getters.user) {
next()
} else {
next('/login')
}
}
The error I am getting export 'store' was not found in '../store'
my vue set up
"dependencies": {
"firebase": "^4.3.0",
"vue": "^2.3.3",
"vue-router": "^2.6.0",
"vuex": "^2.3.1"