Skip to content

Commit

Permalink
Re-order for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Sep 24, 2024
1 parent b59ecb5 commit 9b093fb
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions apps/hyperdrive-trading/src/ui/markets/PoolRow/PoolsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,23 +273,7 @@ export function PoolsList(): ReactElement {
</div>
</div>

{selectedPools.length ? (
selectedPools.map(
({ fixedApr, hyperdrive, isFiat, lpApy, tvl, vaultRate }) => (
<PoolRow
// Combine address and chainId for a unique key, as addresses may
// overlap across chains (e.g. cloudchain and mainnet)
key={`${hyperdrive.address}-${hyperdrive.chainId}`}
hyperdrive={hyperdrive}
tvl={tvl}
isFiat={isFiat}
fixedApr={fixedApr}
vaultRate={vaultRate}
lpApy={lpApy}
/>
),
)
) : (
{!selectedPools.length ? (
<Well
className="max-w-[90vw]"
style={{
Expand All @@ -308,6 +292,22 @@ export function PoolsList(): ReactElement {
/>
)}
</Well>
) : (
selectedPools.map(
({ fixedApr, hyperdrive, isFiat, lpApy, tvl, vaultRate }) => (
<PoolRow
// Combine address and chainId for a unique key, as addresses may
// overlap across chains (e.g. cloudchain and mainnet)
key={`${hyperdrive.address}-${hyperdrive.chainId}`}
hyperdrive={hyperdrive}
tvl={tvl}
isFiat={isFiat}
fixedApr={fixedApr}
vaultRate={vaultRate}
lpApy={lpApy}
/>
),
)
)}
</>
) : null}
Expand Down

0 comments on commit 9b093fb

Please sign in to comment.