Start fetching user timelines.

This commit is contained in:
Roger Braun 2017-06-12 16:00:46 +02:00
parent 85cf036acd
commit 090148ef60
7 changed files with 55 additions and 16 deletions

View file

@ -1,12 +1,18 @@
import UserCardContent from '../user_card_content/user_card_content.vue'
import { find } from 'lodash'
const UserProfile = {
created () {
this.$store.dispatch('startFetching', ['user', this.userId])
},
destroyed () {
this.$store.dispatch('stopFetching', ['user', this.userId])
},
computed: {
userId () {
return this.$route.params.id
},
user () {
const id = this.$route.params.id
const user = find(this.$store.state.users.users, {id})
return user
return this.$store.state.users.usersObject[this.userId]
}
},
components: {