blob: 5f9d4d081b975306715c496ed607279d3d0a2f13 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import UserCardContent from '../user_card_content/user_card_content.vue'
import Timeline from '../timeline/timeline.vue'
const UserProfile = {
created () {
this.$store.commit('clearTimeline', { timeline: 'user' })
this.$store.dispatch('startFetching', ['user', this.userId])
},
destroyed () {
this.$store.dispatch('stopFetching', 'user')
},
computed: {
timeline () { return this.$store.state.statuses.timelines.user },
userId () {
return this.$route.params.id
},
user () {
if (this.timeline.statuses[0]) {
return this.timeline.statuses[0].user
} else {
return false
}
}
},
components: {
UserCardContent,
Timeline
}
}
export default UserProfile
|