Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Vue.prototype.$store = store;
Vue.prototype.$routes = routes;
Vue.prototype.$authService = authService
//route manually
Vue.prototype.$changeRoute = (to) => {
Vue.navigateTo(routes[to])
}
//TNSFontIcon.debug = true;
TNSFontIcon.paths = {
'fa': './font-awesome.css'
};
TNSFontIcon.loadCss();
Vue.filter('fonticon', fonticon)
Vue.use(Vuex)
firebase.init({
onAuthStateChanged: data => { // optional
console.log((data.loggedIn ? "Logged in to firebase" : "Logged out from firebase") + " (init's onAuthStateChanged callback)");
if (data.loggedIn) {
backendService.token = data.user.uid
console.log(data.user.uid)
store.commit('setUser', data.user)
Vue.navigateTo(Home)
}
else {
backendService.token = ""
Vue.navigateTo(Login)