ocr scan
This commit is contained in:
49
express-server/public/test/dash.js
Normal file
49
express-server/public/test/dash.js
Normal file
@@ -0,0 +1,49 @@
|
||||
import Axios from "axios";
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
M.AutoInit();
|
||||
//initialize all modals
|
||||
$('.modal').modal({
|
||||
dismissible: false
|
||||
});
|
||||
|
||||
// Initialize Firebase
|
||||
var config = {
|
||||
apiKey: "AIzaSyCuvwf78cmSDoZ2yS4XxHZhnjUn7yIHYfw",
|
||||
authDomain: "test-667ca.firebaseapp.com",
|
||||
databaseURL: "https://test-667ca.firebaseio.com",
|
||||
projectId: "test-667ca",
|
||||
storageBucket: "test-667ca.appspot.com",
|
||||
messagingSenderId: "221332577314"
|
||||
};
|
||||
|
||||
firebase.initializeApp(config);
|
||||
|
||||
var app = new Vue({
|
||||
el: "myapp",
|
||||
data: {
|
||||
myshoppinglists: [],
|
||||
sharedshoppinglists: []
|
||||
},
|
||||
|
||||
methods: {
|
||||
fetchData: function() {
|
||||
firebase.auth().onAuthStateChanged(function (user) {
|
||||
if (user) {
|
||||
firebase.auth().currentUser.getIdToken( /* forceRefresh */ true).then(function (idtoken) {
|
||||
alert("LALALALAL");
|
||||
}).catch((error) => console.error("Get id token client error: ", error));
|
||||
} else {
|
||||
console.log("Check Auth error", user)
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.fetchData();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user