Skip to content
Permalink
3443d7a54a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
45 lines (37 sloc) 779 Bytes
import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import VueResource from'vue-resource'
Vue.use(VueResource);
import firebase from '@/plugins/firebase-init';
import ui from '@/plugins/firebaseui-init';
import 'bootstrap';
import './assets/app.scss';
Vue.config.productionTip = false;
/**
*
* Makes available:
* - window.firebase
* - window.db
*/
Vue.use(firebase);
/**
* Prebuilt Authentication UI
* Makes available:
* - window.ui
* - this.$ui (in the vue instance)
*/
Vue.use(ui);
new Vue({
router,
store,
render: h => h(App),
created () {
window.firebase.auth().onAuthStateChanged((user) => {
if(user){
store.commit('user', user);
}
});
}
}).$mount('#app')