aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2018-12-06 21:29:02 +0300
committerMaxim Filippov <colixer@gmail.com>2018-12-06 22:10:46 +0300
commitc1dc69a038a598a5b66182ec81051f92040527b4 (patch)
treea56be9094ac2bd6048bded0be24f5d2182008783 /src/components/user_profile/user_profile.js
parente576f8cdad03b53fb4e8669ea814c5b51990b4c5 (diff)
Pass userName instead of userId
Diffstat (limited to 'src/components/user_profile/user_profile.js')
-rw-r--r--src/components/user_profile/user_profile.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 24a8cce9..8a32392a 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -4,9 +4,9 @@ import Timeline from '../timeline/timeline.vue'
const UserProfile = {
created () {
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userId])
- if (!this.$store.state.users.usersObject[this.userId]) {
- this.$store.dispatch('fetchUser', this.userId)
+ this.$store.dispatch('startFetching', ['user', this.userName])
+ if (!this.user) {
+ this.$store.dispatch('fetchUser', this.userName)
}
},
destroyed () {
@@ -34,7 +34,7 @@ const UserProfile = {
userName () {
this.$store.dispatch('stopFetching', 'user')
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userId])
+ this.$store.dispatch('startFetching', ['user', this.userName])
}
},
components: {