aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_card
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_card')
-rw-r--r--src/components/user_card/user_card.js4
-rw-r--r--src/components/user_card/user_card.vue3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js
index b8eb28e3..ea893567 100644
--- a/src/components/user_card/user_card.js
+++ b/src/components/user_card/user_card.js
@@ -1,4 +1,5 @@
import UserCardContent from '../user_card_content/user_card_content.vue'
+import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
const UserCard = {
props: [
@@ -28,6 +29,9 @@ const UserCard = {
denyUser () {
this.$store.state.api.backendInteractor.denyUser(this.user.id)
this.$store.dispatch('removeFollowRequest', this.user)
+ },
+ userProfileLink (user) {
+ return generateProfileLink(user.id, user.screen_name)
}
}
}
diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue
index eb0d7576..0f163e36 100644
--- a/src/components/user_card/user_card.vue
+++ b/src/components/user_card/user_card.vue
@@ -19,7 +19,8 @@
{{ currentUser.id == user.id ? $t('user_card.its_you') : $t('user_card.follows_you') }}
</span>
</div>
- <router-link class='user-screen-name' :to="{ name: 'user-profile', params: { id: user.id } }">
+
+ <router-link class='user-screen-name' :to="userProfileLink(user)">
@{{user.screen_name}}
</router-link>
</div>