0👍
user_account/getUserDetailsSuccess
sets state.user
, but your computed prop does not return .user
.
It should look like this:
export default {
created() {
this.$store.dispatch('user_account/getUserDetails')
},
computed: {
currentUser() {
// return this.$store.state.user_account ❌
return this.$store.state.user_account.user
},
},
}
Source:stackexchange.com