-
Notifications
You must be signed in to change notification settings - Fork 6
/
main.js
38 lines (31 loc) · 935 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import Vue from 'vue';
import App from './App.vue';
import * as firebase from 'firebase';
import router from './router';
import store from './store';
import vuetify from './plugins/vuetify';
import { firestorePlugin } from 'vuefire'
Vue.config.productionTip = false;
Vue.use(firestorePlugin);
const configOptions = {
apiKey: "AIzaSyBcSNX_ThLdRBd65cTeMS83jWNw7vJfo9g",
authDomain: "fire-panel.firebaseapp.com",
databaseURL: "https://fire-panel.firebaseio.com",
projectId: "fire-panel",
storageBucket: "fire-panel.appspot.com",
messagingSenderId: "506919428842",
appId: "1:506919428842:web:46540205a6d2c150d32d93"
};
firebase.initializeApp(configOptions);
let app;
firebase.auth().onAuthStateChanged(user => {
store.dispatch('auth/fetchUser', user);
if(!app) {
new Vue({
store,
router,
vuetify,
render: h => h(App)
}).$mount('#app');
}
});