open orders empty states
This commit is contained in:
parent
637f14a8a3
commit
f15de620ee
|
@ -341,7 +341,7 @@ const SwapHistoryTable = ({
|
|||
</div>
|
||||
)
|
||||
) : (
|
||||
<div className="flex flex-col items-center border-b border-th-bkg-3 p-8">
|
||||
<div className="flex flex-col items-center p-8">
|
||||
<ClockIcon className="mb-2 h-6 w-6 text-th-fgd-4" />
|
||||
<p>No swap history found...</p>
|
||||
</div>
|
||||
|
@ -363,7 +363,7 @@ const SwapHistoryTable = ({
|
|||
</div>
|
||||
)
|
||||
) : (
|
||||
<div className="flex flex-col items-center border-b border-th-bkg-3 p-8">
|
||||
<div className="flex flex-col items-center p-8">
|
||||
<LinkIcon className="mb-2 h-6 w-6 text-th-fgd-4" />
|
||||
<p>Connect to view your swap history</p>
|
||||
</div>
|
||||
|
|
|
@ -2,8 +2,9 @@ import { Serum3Side } from '@blockworks-foundation/mango-v4'
|
|||
import Button from '@components/shared/Button'
|
||||
import SideBadge from '@components/shared/SideBadge'
|
||||
import TabButtons from '@components/shared/TabButtons'
|
||||
import { QuestionMarkCircleIcon } from '@heroicons/react/20/solid'
|
||||
import { LinkIcon, QuestionMarkCircleIcon } from '@heroicons/react/20/solid'
|
||||
import { Order } from '@project-serum/serum/lib/market'
|
||||
import { useWallet } from '@solana/wallet-adapter-react'
|
||||
import mangoStore from '@store/mangoStore'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import Image from 'next/image'
|
||||
|
@ -135,6 +136,7 @@ const Balances = () => {
|
|||
|
||||
const OpenOrders = () => {
|
||||
const { t } = useTranslation('common')
|
||||
const { connected } = useWallet()
|
||||
const openOrders = mangoStore((s) => s.mangoAccount.openOrders)
|
||||
|
||||
const handleCancelOrder = useCallback(
|
||||
|
@ -172,7 +174,8 @@ const OpenOrders = () => {
|
|||
[t]
|
||||
)
|
||||
|
||||
return (
|
||||
return connected ? (
|
||||
openOrders.length ? (
|
||||
<table>
|
||||
<thead>
|
||||
<tr className="">
|
||||
|
@ -201,6 +204,16 @@ const OpenOrders = () => {
|
|||
})}
|
||||
</tbody>
|
||||
</table>
|
||||
) : (
|
||||
<div className="flex flex-col items-center p-8">
|
||||
<p>No open orders...</p>
|
||||
</div>
|
||||
)
|
||||
) : (
|
||||
<div className="flex flex-col items-center p-8">
|
||||
<LinkIcon className="mb-2 h-6 w-6 text-th-fgd-4" />
|
||||
<p>Connect to view your open orders</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue