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>
|
</div>
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
</div>
|
</div>
|
||||||
<span className="text-xs text-primary">
|
{data.user_created.username && (
|
||||||
by <b>{data.user_created.username}</b>
|
<span className="text-xs text-primary">
|
||||||
</span>
|
by <b>{data.user_created.username}</b>
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
|
||||||
<CardDescription className="pb-2 pt-2">
|
<CardDescription className="pb-2 pt-2">
|
||||||
<div className="truncate-doubleline">{data.description}</div>
|
<div className="truncate-doubleline">{data.description}</div>
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue