refactor(components): display co-author in story listing
This commit is contained in:
parent
1412d39240
commit
b65c725a36
@ -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">
|
||||||
|
and
|
||||||
|
<NuxtLink :to="`/user/${story.coAuthor._id}`">
|
||||||
|
{{ story.coAuthor.username }}
|
||||||
|
</NuxtLink>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user