Skip to content

Commit

Permalink
update ?
Browse files Browse the repository at this point in the history
  • Loading branch information
sainthiago committed Feb 20, 2024
1 parent b59e45f commit b2cdd7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions blogchain/src/app/post/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export default function PostDetail() {
className="flex gap-2 items-center text-xs"
>
<div>
{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}
</div>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions blogchain/src/components/post-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const PostCard = ({
<div className="p-5">
<Badge>{postDate}</Badge>
<h5 className="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
{title.length > 30 ? `${title.substring(0, 30)}...` : title}
{title?.length > 30 ? `${title.substring(0, 30)}...` : title}
</h5>
<p className="mb-3 font-normal text-gray-700 dark:text-gray-400 break-all">
<ReactMarkdown>
{description.length > 100
{description?.length > 100
? `${description.substring(0, 100)}...`
: description}
</ReactMarkdown>
Expand Down

0 comments on commit b2cdd7a

Please sign in to comment.