aboutsummaryrefslogtreecommitdiff
path: root/src/components/chat_title/chat_title.js
blob: 2723d5f5550b929ad03d13e31a8727628c803e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Vue from 'vue'
import ChatAvatar from '../chat_avatar/chat_avatar.vue'

export default Vue.component('chat-title', {
  name: 'ChatTitle',
  components: {
    ChatAvatar
  },
  props: [
    'user', 'withAvatar'
  ],
  computed: {
    title () {
      return this.user ? this.user.screen_name : ''
    },
    htmlTitle () {
      return this.user ? this.user.name_html : ''
    }
  }
})