refactor(components): display co-author in story listing

This commit is contained in:
parent 1412d39240
commit b65c725a36
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { IStory } from "~/models/stories/index"; import type { IStory } from "@models/stories";
import { log } from "~/lib/server/logger"; import { log } from "~/lib/server/logger";
import { format } from "date-fns"; import { format } from "date-fns";
import icon from "../icon.vue"; import icon from "../icon.vue";
@ -64,6 +64,12 @@
{{ story.author.username }} {{ story.author.username }}
</NuxtLink> </NuxtLink>
</span> </span>
<span v-if="story.coAuthor">
&nbsp;and&nbsp;
<NuxtLink :to="`/user/${story.coAuthor._id}`">
{{ story.coAuthor.username }}
</NuxtLink>
</span>
</div> </div>
</div> </div>
</template> </template>