Skip to content

Commit 6fce4ab

Browse files
committed
chore: check avatars types
1 parent e03c0f0 commit 6fce4ab

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

app/components/OgImage/BlogPost.vue

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,16 @@ const formattedDate = computed(() => {
3636
const MAX_VISIBLE_AUTHORS = 2
3737
3838
const visibleAuthors = computed(() => {
39-
console.log('blog post 5', props.authors)
39+
console.log('blog post 5')
40+
props.authors.map(author => {
41+
console.log(
42+
'blog post 5.1',
43+
author.avatar,
44+
author.name,
45+
typeof author.avatar,
46+
typeof author.name,
47+
)
48+
})
4049
if (props.authors.length <= 3) return props.authors
4150
return props.authors.slice(0, MAX_VISIBLE_AUTHORS)
4251
})
@@ -106,13 +115,13 @@ const formattedAuthorNames = computed(() => {
106115
class="flex items-center justify-center rounded-full border border-[#050505] bg-[#1a1a1a] overflow-hidden w-12 h-12"
107116
:style="{ marginLeft: index > 0 ? '-20px' : '0' }"
108117
>
109-
<!-- <img
118+
<img
110119
v-if="author.avatar"
111120
:src="author.avatar"
112121
:alt="author.name"
113122
class="w-full h-full object-cover"
114123
/>
115-
<span v-else style="font-size: 20px; color: #666; font-weight: 500">
124+
<!-- <span v-else style="font-size: 20px; color: #666; font-weight: 500">
116125
{{ getInitials(author.name) }}
117126
</span> -->
118127
</span>

0 commit comments

Comments
 (0)