Skip to content

Commit

Permalink
πŸ› Show author.name only if author is object
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Feb 10, 2025
1 parent c47ddea commit 5d19291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/latest-books.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,11 @@ const bookList = computed(() => selectedTabItemKey.value === 'latest' ? latestBo
const tableRows = computed(() => bookList.value.map((b: any) => {
const className = b.name || b.title
const image = b.thumbnailUrl || b.imageUrl
const author = b.author?.name || b.author
return {
className,
image: image ? getImageResizeURL(parseImageURLFromMetadata(image)) : undefined,
author: b.author,
author,
priceInUSD: `US$${b.minPrice || b.prices?.[0]?.price || 0}`,
url: `${LIKER_LAND_URL}/nft/class/${b.classId}?from=${channelId.value}&utm_source=bookpress&utm_medium=list_${selectedTabItemKey.value}`
}
Expand Down

0 comments on commit 5d19291

Please sign in to comment.