I have been using the basic license of Serenity. I have a problem.
I used VueJS 3, Vuex, and backend with Django rest framework with simple JWT for our project.
After I logged in successfully, I performed to get user information and save into localstorage by Vuex (store), and push to dashboard page.
At AppTopbar.vue, I edited profile name by getting fullname of user from localstorage. But it not displayed.
If I refresh dashboard page again, fullname is displayed.
Why logged in successfully and push to dashboard page, fullname of user is not displayed. Please help me. Thank you!
Code: Select all
..........
<span class="topbar-item-name profile-name">{{ profileName }}</span>
..........
computed: {
topbarMenuClass () {
return ['topbar-menu fadeInDown', {
'topbar-menu-active': this.topbarMenuActive
}]
},
profileName () {
const authUser = JSON.parse(this.$store.state.authUser)
return authUser.first_name + ' ' + authUser.last_name
}
}