aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
blob: 5eef2735f8a96245ab408aed6542e238277e2dac (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
import UserCardContent from '../user_card_content/user_card_content.vue'
import Timeline from '../timeline/timeline.vue'

const UserProfile = {
  created () {
    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 () {
      return this.$store.state.users.usersObject[this.userId]
    }
  },
  components: {
    UserCardContent,
    Timeline
  }
}

export default UserProfile