fix(market-card.tsx): add conditional rendering for username to prevent error when data.user_created.username is undefined
This commit is contained in:
parent
c7ceb43979
commit
8803e944ee
1 changed files with 6 additions and 3 deletions
|
|
@ -171,9 +171,12 @@ export const MarketCardComponent = ({
|
|||
</div>
|
||||
</CardTitle>
|
||||
</div>
|
||||
<span className="text-xs text-primary">
|
||||
by <b>{data.user_created.username}</b>
|
||||
</span>
|
||||
{data.user_created.username && (
|
||||
<span className="text-xs text-primary">
|
||||
by <b>{data.user_created.username}</b>
|
||||
</span>
|
||||
)}
|
||||
|
||||
<CardDescription className="pb-2 pt-2">
|
||||
<div className="truncate-doubleline">{data.description}</div>
|
||||
</CardDescription>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue