Skip to content

Commit

Permalink
fix empty display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xieqiancaosissi committed Jan 2, 2024
1 parent 32d0244 commit 2f8f90f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions screens/TokenDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ function TokenUserInfo() {
) : (
<>
<span className="text-sm text-gray-300">Available to Borrow</span>
{accountId && tokenRow?.can_borrow ? (
{accountId && tokenRow?.can_borrow && Object.keys(maxBorrowAmountPositions).length ? (
<div className="flex flex-col items-end gap-2">
{Object.entries(maxBorrowAmountPositions).map(([position, { maxBorrowAmount }]) => {
return (
Expand All @@ -842,7 +842,9 @@ function TokenUserInfo() {
</div>
) : (
<div className="flex items-center">
<span className="text-sm text-white mr-2.5">-</span>
<span className="text-sm text-white mr-2.5">
{accountId && tokenRow?.can_borrow ? "0" : "-"}
</span>
<img src={tokenRow?.icon} className="w-5 h-5 rounded-full" alt="" />
</div>
)}
Expand Down

0 comments on commit 2f8f90f

Please sign in to comment.