yandere_fe/src/components/avatar_list/avatar_list.js

22 lines
527 B
JavaScript
Raw Normal View History

2019-04-01 19:30:23 -07:00
import UserAvatar from '../user_avatar/user_avatar.vue'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
2019-04-01 19:30:23 -07:00
const AvatarList = {
props: ['users'],
2019-04-01 19:30:23 -07:00
computed: {
slicedUsers () {
return this.users ? this.users.slice(0, 15) : []
2019-04-01 19:30:23 -07:00
}
},
components: {
UserAvatar
},
methods: {
userProfileLink (user) {
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
}
2019-04-01 19:30:23 -07:00
}
}
export default AvatarList