Skip to content
Permalink
a4379df259
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
49 lines (42 sloc) 844 Bytes
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import firebase from '@/plugins/firebase-init'
import ui from '@/plugins/firebaseui-init'
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')
// var posts = new Vue ({
// el: '#postList',
// data: {
// posts: [
// { message: 'first' },
// { message: 'second' },
// { message: 'third' }],
// },
// });