forked from AkkomaGang/akkoma-fe
link interaction avatars to the user profile
This commit is contained in:
parent
157d4e601e
commit
31e14cd45d
2 changed files with 9 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
import UserAvatar from '../user_avatar/user_avatar.vue'
|
import UserAvatar from '../user_avatar/user_avatar.vue'
|
||||||
|
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
|
||||||
|
|
||||||
const AvatarList = {
|
const AvatarList = {
|
||||||
props: ['users'],
|
props: ['users'],
|
||||||
|
@ -9,6 +10,11 @@ const AvatarList = {
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
UserAvatar
|
UserAvatar
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
userProfileLink (user) {
|
||||||
|
return generateProfileLink(user.id, user.screen_name, this.$store.state.instance.restrictedNicknames)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="avatars">
|
<div class="avatars">
|
||||||
<div class="avatars-item" v-for="user in slicedUsers">
|
<router-link :to="userProfileLink(user)" class="avatars-item" v-for="user in slicedUsers">
|
||||||
<UserAvatar :user="user" class="avatar-small" />
|
<UserAvatar :user="user" class="avatar-small" />
|
||||||
</div>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue