11<script setup lang="ts">
2- import type { Author } from ' #shared/schemas/blog'
2+ import type { ResolvedAuthor } from ' #shared/schemas/blog'
33
44const props = withDefaults (
55 defineProps <{
66 title: string
7- authors? : Author []
7+ authors? : ResolvedAuthor []
88 date? : string
99 primaryColor? : string
1010 }>(),
@@ -15,8 +15,6 @@ const props = withDefaults(
1515 },
1616)
1717
18- const { resolvedAuthors } = useBlueskyAuthorProfiles (props .authors )
19-
2018const formattedDate = computed (() => {
2119 if (! props .date ) return ' '
2220 try {
@@ -41,17 +39,17 @@ const getInitials = (name: string) =>
4139 .slice (0 , 2 )
4240
4341const visibleAuthors = computed (() => {
44- if (resolvedAuthors . value .length <= 3 ) return resolvedAuthors . value
45- return resolvedAuthors . value .slice (0 , MAX_VISIBLE_AUTHORS )
42+ if (props . authors .length <= 3 ) return props . authors
43+ return props . authors .slice (0 , MAX_VISIBLE_AUTHORS )
4644})
4745
4846const extraCount = computed (() => {
49- if (resolvedAuthors . value .length <= 3 ) return 0
50- return resolvedAuthors . value .length - MAX_VISIBLE_AUTHORS
47+ if (props . authors .length <= 3 ) return 0
48+ return props . authors .length - MAX_VISIBLE_AUTHORS
5149})
5250
5351const formattedAuthorNames = computed (() => {
54- const allNames = resolvedAuthors . value .map (a => a .name )
52+ const allNames = props . authors .map (a => a .name )
5553 if (allNames .length === 0 ) return ' '
5654 if (allNames .length === 1 ) return allNames [0 ]
5755 if (allNames .length === 2 ) return ` ${allNames [0 ]} and ${allNames [1 ]} `
@@ -96,7 +94,7 @@ const formattedAuthorNames = computed(() => {
9694
9795 <!-- Authors -->
9896 <div
99- v-if =" resolvedAuthors .length"
97+ v-if =" authors .length"
10098 class =" flex items-center gap-4 self-start justify-start flex-nowrap"
10199 style =" font-family : ' Geist' , sans-serif "
102100 >
0 commit comments