Pass userName instead of userId
This commit is contained in:
parent
e576f8cdad
commit
c1dc69a038
|
@ -4,9 +4,9 @@ import Timeline from '../timeline/timeline.vue'
|
||||||
const UserProfile = {
|
const UserProfile = {
|
||||||
created () {
|
created () {
|
||||||
this.$store.commit('clearTimeline', { timeline: 'user' })
|
this.$store.commit('clearTimeline', { timeline: 'user' })
|
||||||
this.$store.dispatch('startFetching', ['user', this.userId])
|
this.$store.dispatch('startFetching', ['user', this.userName])
|
||||||
if (!this.$store.state.users.usersObject[this.userId]) {
|
if (!this.user) {
|
||||||
this.$store.dispatch('fetchUser', this.userId)
|
this.$store.dispatch('fetchUser', this.userName)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed () {
|
destroyed () {
|
||||||
|
@ -34,7 +34,7 @@ const UserProfile = {
|
||||||
userName () {
|
userName () {
|
||||||
this.$store.dispatch('stopFetching', 'user')
|
this.$store.dispatch('stopFetching', 'user')
|
||||||
this.$store.commit('clearTimeline', { timeline: 'user' })
|
this.$store.commit('clearTimeline', { timeline: 'user' })
|
||||||
this.$store.dispatch('startFetching', ['user', this.userId])
|
this.$store.dispatch('startFetching', ['user', this.userName])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
Loading…
Reference in New Issue