Skip to content

Commit

Permalink
fix: userposition instead of tvl
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Sep 29, 2024
1 parent 44799c3 commit 2b5a551
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/components/Yield/PoolItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ export const PoolItem = ({ pool }: Props) => {
{isWideScreen && (
<div>
<div>
{price === undefined || userPosition === undefined ? (
{price === undefined ||
userPosition === undefined ||
userPosition === 0 ? (
<p>-</p>
) : (
<p>${formatNumber(tvl * price)}</p>
<p>${formatNumber(userPosition * price)}</p>
)}
{userPosition === undefined ? (
{userPosition === undefined || userPosition === 0 ? (
<p>- {pool.underlying.symbol}</p>
) : (
<p className="p4 secondary-col">
Expand All @@ -197,7 +199,7 @@ export const PoolItem = ({ pool }: Props) => {
)}
<div>
<button onClick={handleClick} className="primary active mainbutton">
{userPosition === undefined ? "View" : "Manage"}
{userPosition === undefined || userPosition === 0 ? "View" : "Manage"}
</button>
</div>
</div>
Expand Down

0 comments on commit 2b5a551

Please sign in to comment.