summaryrefslogtreecommitdiff
path: root/src/web/app/mobile/views/components/post-card.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/mobile/views/components/post-card.vue')
-rw-r--r--src/web/app/mobile/views/components/post-card.vue8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/web/app/mobile/views/components/post-card.vue b/src/web/app/mobile/views/components/post-card.vue
index 1b3b20d88f..8ca7550c2e 100644
--- a/src/web/app/mobile/views/components/post-card.vue
+++ b/src/web/app/mobile/views/components/post-card.vue
@@ -1,8 +1,8 @@
<template>
<div class="mk-post-card">
- <a :href="`/@${post.user.username}/${post.id}`">
+ <a :href="`/@${acct}/${post.id}`">
<header>
- <img :src="`${post.user.avatar_url}?thumbnail&size=64`" alt="avatar"/><h3>{{ post.user.name }}</h3>
+ <img :src="`${acct}?thumbnail&size=64`" alt="avatar"/><h3>{{ post.user.name }}</h3>
</header>
<div>
{{ text }}
@@ -15,10 +15,14 @@
<script lang="ts">
import Vue from 'vue';
import summary from '../../../../../common/get-post-summary';
+import getAcct from '../../../../../common/user/get-acct';
export default Vue.extend({
props: ['post'],
computed: {
+ acct() {
+ return getAcct(this.post.user);
+ },
text(): string {
return summary(this.post);
}