Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// //alert("Trying to sign in");
// }
},
signInSuccessUrl: 'http://localhost:8080/hello',
// signInSuccessUrl: '/hello',
signInOptions: [
this.$firebase.auth.GoogleAuthProvider.PROVIDER_ID,
this.$firebase.auth.EmailAuthProvider.PROVIDER_ID
Expand All @@ -43,7 +43,9 @@
},
methods: {
sendToStore(user) {
console.log(user)
this.$store.dispatch('setUser', user); //|| false)
this.$router.push('/hello')
}
}
}
Expand Down
25 changes: 11 additions & 14 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ const initialState = {
userTagList: {}
}

//const state = Object.assign({}, initialState)
const state = Object.assign({}, initialState)

const state = {
user: {},
lastPOI: {},
profile: {},
simplePoints: 10,
tagPoints: 50,
flagToSpamThreshold: 1,
userTagList: {}
}
// const state = {
// user: {},
// lastPOI: {},
// profile: {},
// simplePoints: 10,
// tagPoints: 50,
// flagToSpamThreshold: 1,
// userTagList: {}
// }

const mutations = {
SET_USER (state, user) {
state.user = user
console.log("Mutation User: " + user.displayName)
console.log("Mutation User: " + state.user.displayName)
},
SET_PROFILE (state, profile) {
state.profile = profile
Expand Down Expand Up @@ -100,6 +100,3 @@ const store = new Vuex.Store({
})

export default store