Skip to content

Commit

Permalink
only show my orders when wallet is connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Robiquet committed May 22, 2024
1 parent 08b2b78 commit 1b8753d
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions pages/markets/[marketid].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,19 @@ const Market: NextPage<MarketPageProps> = ({
) : (
<></>
)}
{isOrdersLoading === false && (orders?.length ?? 0) > 0 && (
<div className="mt-3 flex flex-col gap-y-3">
<div>My Orders</div>
<OrdersTable
where={{
marketId_eq: marketId,
makerAccountId_eq: realAddress,
}}
/>
</div>
)}
{realAddress &&
isOrdersLoading === false &&
(orders?.length ?? 0) > 0 && (
<div className="mt-3 flex flex-col gap-y-3">
<div>My Orders</div>
<OrdersTable
where={{
marketId_eq: marketId,
makerAccountId_eq: realAddress,
}}
/>
</div>
)}
{marketIsLoading === false && marketHasPool === false && (
<div className="flex h-ztg-22 items-center rounded-ztg-5 bg-vermilion-light p-ztg-20 text-vermilion">
<div className="h-ztg-20 w-ztg-20">
Expand Down

0 comments on commit 1b8753d

Please sign in to comment.