diff --git a/blogchain/src/app/post/[id]/page.tsx b/blogchain/src/app/post/[id]/page.tsx index 905a637..c7c20fa 100644 --- a/blogchain/src/app/post/[id]/page.tsx +++ b/blogchain/src/app/post/[id]/page.tsx @@ -44,8 +44,8 @@ export default function PostDetail() { className="flex gap-2 items-center text-xs" >
- {post.nft_contract_id.length > 48 - ? `${post.nft_contract_id.substring(0, 48)}...` + {post.nft_contract_id?.length > 48 + ? `${post.nft_contract_id?.substring(0, 48)}...` : post.nft_contract_id}
diff --git a/blogchain/src/components/post-card.tsx b/blogchain/src/components/post-card.tsx index 175aef7..2becbc9 100644 --- a/blogchain/src/components/post-card.tsx +++ b/blogchain/src/components/post-card.tsx @@ -31,11 +31,11 @@ const PostCard = ({
{postDate}
- {title.length > 30 ? `${title.substring(0, 30)}...` : title} + {title?.length > 30 ? `${title.substring(0, 30)}...` : title}

- {description.length > 100 + {description?.length > 100 ? `${description.substring(0, 100)}...` : description}