2021-08-16 06:31:25 -07:00
|
|
|
import { useMemo } from 'react'
|
2021-07-20 07:21:58 -07:00
|
|
|
import FloatingElement from './FloatingElement'
|
|
|
|
import { ElementTitle } from './styles'
|
2021-08-14 13:05:31 -07:00
|
|
|
import useMangoStore, { mangoClient } from '../stores/useMangoStore'
|
2021-08-15 10:06:52 -07:00
|
|
|
import {
|
|
|
|
ceilToDecimal,
|
|
|
|
floorToDecimal,
|
|
|
|
i80f48ToPercent,
|
|
|
|
formatUsdValue,
|
2021-08-20 18:42:59 -07:00
|
|
|
tokenPrecision,
|
2021-08-15 10:06:52 -07:00
|
|
|
} from '../utils/index'
|
2021-08-16 06:31:25 -07:00
|
|
|
import { LinkButton } from './Button'
|
2021-07-20 07:21:58 -07:00
|
|
|
import Tooltip from './Tooltip'
|
|
|
|
import SideBadge from './SideBadge'
|
2021-08-14 13:05:31 -07:00
|
|
|
import {
|
|
|
|
getMarketIndexBySymbol,
|
|
|
|
nativeI80F48ToUi,
|
|
|
|
PerpAccount,
|
|
|
|
PerpMarket,
|
|
|
|
QUOTE_INDEX,
|
|
|
|
ZERO_BN,
|
2021-08-16 10:00:43 -07:00
|
|
|
ZERO_I80F48,
|
2021-08-14 13:05:31 -07:00
|
|
|
} from '@blockworks-foundation/mango-client'
|
|
|
|
import useTradeHistory from '../hooks/useTradeHistory'
|
2021-08-15 10:06:52 -07:00
|
|
|
import { getAvgEntryPrice, getBreakEvenPrice } from './PerpPositionsTable'
|
2021-08-14 13:05:31 -07:00
|
|
|
import { notify } from '../utils/notifications'
|
|
|
|
|
|
|
|
const handleSettlePnl = async (
|
|
|
|
perpMarket: PerpMarket,
|
|
|
|
perpAccount: PerpAccount
|
|
|
|
) => {
|
|
|
|
const mangoAccount = useMangoStore.getState().selectedMangoAccount.current
|
|
|
|
const mangoGroup = useMangoStore.getState().selectedMangoGroup.current
|
|
|
|
const mangoCache = useMangoStore.getState().selectedMangoGroup.cache
|
|
|
|
const wallet = useMangoStore.getState().wallet.current
|
|
|
|
const actions = useMangoStore.getState().actions
|
|
|
|
const marketIndex = mangoGroup.getPerpMarketIndex(perpMarket.publicKey)
|
|
|
|
|
|
|
|
try {
|
|
|
|
const txid = await mangoClient.settlePnl(
|
|
|
|
mangoGroup,
|
2021-08-20 13:39:44 -07:00
|
|
|
mangoCache,
|
2021-08-14 13:05:31 -07:00
|
|
|
mangoAccount,
|
|
|
|
perpMarket,
|
|
|
|
mangoGroup.rootBankAccounts[QUOTE_INDEX],
|
|
|
|
mangoCache.priceCache[marketIndex].price,
|
|
|
|
wallet
|
|
|
|
)
|
|
|
|
actions.fetchMangoAccounts()
|
|
|
|
notify({
|
|
|
|
title: 'Successfully settled PNL',
|
|
|
|
description: '',
|
|
|
|
txid,
|
|
|
|
})
|
|
|
|
} catch (e) {
|
|
|
|
console.log('Error settling PNL: ', `${e}`, `${perpAccount}`)
|
|
|
|
notify({
|
|
|
|
title: 'Error settling PNL',
|
|
|
|
description: e.message,
|
|
|
|
txid: e.txid,
|
|
|
|
type: 'error',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
2021-07-20 07:21:58 -07:00
|
|
|
|
2021-08-16 14:35:16 -07:00
|
|
|
export function SettlePnlTooltip() {
|
|
|
|
return (
|
|
|
|
<div>
|
2021-08-23 11:36:02 -07:00
|
|
|
Settling will update your USDC balance to reflect the unsettled PnL
|
|
|
|
amount.{' '}
|
2021-08-16 14:35:16 -07:00
|
|
|
<a
|
|
|
|
href="https://docs.mango.markets/mango-v3/overview#settle-pnl"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
>
|
|
|
|
Learn more
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-07-20 07:21:58 -07:00
|
|
|
export default function MarketPosition() {
|
2021-08-14 13:05:31 -07:00
|
|
|
const mangoGroup = useMangoStore((s) => s.selectedMangoGroup.current)
|
|
|
|
const mangoGroupConfig = useMangoStore((s) => s.selectedMangoGroup.config)
|
|
|
|
const mangoGroupCache = useMangoStore((s) => s.selectedMangoGroup.cache)
|
|
|
|
const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current)
|
|
|
|
const selectedMarket = useMangoStore((s) => s.selectedMarket.current)
|
2021-07-20 07:21:58 -07:00
|
|
|
const marketConfig = useMangoStore((s) => s.selectedMarket.config)
|
2021-08-14 13:05:31 -07:00
|
|
|
const connected = useMangoStore((s) => s.wallet.connected)
|
2021-08-20 06:17:02 -07:00
|
|
|
const isLoading = useMangoStore((s) => s.selectedMangoAccount.initialLoad)
|
2021-08-20 04:51:29 -07:00
|
|
|
const setMangoStore = useMangoStore((s) => s.set)
|
2021-07-20 07:21:58 -07:00
|
|
|
const baseSymbol = marketConfig.baseSymbol
|
2021-08-14 13:05:31 -07:00
|
|
|
const marketName = marketConfig.name
|
|
|
|
const tradeHistory = useTradeHistory()
|
|
|
|
const perpTradeHistory = tradeHistory?.filter(
|
|
|
|
(t) => t.marketName === marketName
|
2021-07-20 07:21:58 -07:00
|
|
|
)
|
|
|
|
|
2021-08-14 13:05:31 -07:00
|
|
|
const marketIndex = useMemo(() => {
|
|
|
|
return getMarketIndexBySymbol(mangoGroupConfig, baseSymbol)
|
|
|
|
}, [mangoGroupConfig, baseSymbol])
|
|
|
|
|
|
|
|
const perpAccount = useMemo(() => {
|
|
|
|
if (marketName.includes('PERP') && mangoAccount) {
|
|
|
|
return mangoAccount.perpAccounts[marketIndex]
|
|
|
|
}
|
|
|
|
}, [marketName, mangoAccount, marketIndex])
|
|
|
|
|
2021-08-20 04:51:29 -07:00
|
|
|
const handleSizeClick = (size) => {
|
|
|
|
setMangoStore((state) => {
|
|
|
|
state.tradeForm.baseSize = size
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-08-17 08:10:32 -07:00
|
|
|
if (!mangoGroup) return null
|
|
|
|
|
2021-08-14 13:05:31 -07:00
|
|
|
return selectedMarket instanceof PerpMarket ? (
|
2021-07-22 04:34:03 -07:00
|
|
|
<FloatingElement showConnect>
|
2021-08-14 11:16:15 -07:00
|
|
|
<div className={!connected ? 'filter blur-sm' : null}>
|
2021-07-22 04:34:03 -07:00
|
|
|
<ElementTitle>Position</ElementTitle>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex items-center justify-between pb-3`}>
|
2021-07-20 07:21:58 -07:00
|
|
|
<div className="font-normal text-th-fgd-3 leading-4">Side</div>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount && !perpAccount.basePosition.eq(ZERO_BN) ? (
|
2021-08-14 13:05:31 -07:00
|
|
|
<SideBadge
|
|
|
|
side={perpAccount.basePosition.gt(ZERO_BN) ? 'long' : 'short'}
|
|
|
|
/>
|
|
|
|
) : (
|
2021-08-20 04:51:29 -07:00
|
|
|
'--'
|
2021-08-14 13:05:31 -07:00
|
|
|
)}
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex justify-between pb-3`}>
|
2021-08-14 13:05:31 -07:00
|
|
|
<div className="font-normal text-th-fgd-3 leading-4">
|
|
|
|
Position size
|
|
|
|
</div>
|
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount &&
|
|
|
|
Math.abs(
|
|
|
|
selectedMarket.baseLotsToNumber(perpAccount.basePosition)
|
|
|
|
) > 0 ? (
|
2021-08-20 04:51:29 -07:00
|
|
|
<span
|
|
|
|
className="cursor-pointer underline hover:no-underline"
|
|
|
|
onClick={() =>
|
|
|
|
handleSizeClick(
|
|
|
|
Math.abs(
|
|
|
|
selectedMarket.baseLotsToNumber(perpAccount.basePosition)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
>
|
|
|
|
{`${Math.abs(
|
2021-08-17 14:01:00 -07:00
|
|
|
selectedMarket.baseLotsToNumber(perpAccount.basePosition)
|
2021-08-20 04:51:29 -07:00
|
|
|
)} ${baseSymbol}`}
|
|
|
|
</span>
|
|
|
|
) : (
|
|
|
|
`0 ${baseSymbol}`
|
|
|
|
)}
|
2021-08-14 13:05:31 -07:00
|
|
|
</div>
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex justify-between pb-3`}>
|
2021-07-20 07:21:58 -07:00
|
|
|
<div className="font-normal text-th-fgd-3 leading-4">
|
2021-08-14 13:05:31 -07:00
|
|
|
Notional size
|
|
|
|
</div>
|
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount ? (
|
|
|
|
formatUsdValue(
|
|
|
|
selectedMarket.baseLotsToNumber(perpAccount.basePosition) *
|
|
|
|
mangoGroup.getPrice(marketIndex, mangoGroupCache).toNumber()
|
|
|
|
)
|
|
|
|
) : (
|
|
|
|
0
|
|
|
|
)}
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex justify-between pb-3`}>
|
2021-08-14 13:05:31 -07:00
|
|
|
<div className="font-normal text-th-fgd-3 leading-4">
|
|
|
|
Avg entry price
|
|
|
|
</div>
|
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount ? (
|
|
|
|
getAvgEntryPrice(
|
|
|
|
mangoAccount,
|
|
|
|
perpAccount,
|
|
|
|
selectedMarket,
|
|
|
|
perpTradeHistory
|
|
|
|
)
|
|
|
|
) : (
|
|
|
|
0
|
|
|
|
)}
|
2021-08-14 13:05:31 -07:00
|
|
|
</div>
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex justify-between pb-3`}>
|
2021-07-20 07:21:58 -07:00
|
|
|
<div className="font-normal text-th-fgd-3 leading-4">
|
2021-08-14 13:05:31 -07:00
|
|
|
Break-even price
|
|
|
|
</div>
|
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount ? (
|
|
|
|
getBreakEvenPrice(
|
|
|
|
mangoAccount,
|
|
|
|
perpAccount,
|
|
|
|
selectedMarket,
|
|
|
|
perpTradeHistory
|
|
|
|
)
|
|
|
|
) : (
|
|
|
|
0
|
|
|
|
)}
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-08-21 05:11:14 -07:00
|
|
|
<div className={`flex justify-between pb-3`}>
|
2021-08-16 14:35:16 -07:00
|
|
|
<Tooltip content={<SettlePnlTooltip />}>
|
2021-08-16 10:00:43 -07:00
|
|
|
<Tooltip.Content className="font-normal text-th-fgd-3 leading-4">
|
|
|
|
Unsettled PnL
|
|
|
|
</Tooltip.Content>
|
|
|
|
</Tooltip>
|
2021-08-16 06:31:25 -07:00
|
|
|
<div className={`flex items-center text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : perpAccount ? (
|
|
|
|
formatUsdValue(
|
|
|
|
+nativeI80F48ToUi(
|
|
|
|
perpAccount.getPnl(
|
|
|
|
mangoGroup.perpMarkets[marketIndex],
|
2021-08-20 13:39:44 -07:00
|
|
|
mangoGroupCache.perpMarketCache[marketIndex],
|
2021-08-20 06:17:02 -07:00
|
|
|
mangoGroupCache.priceCache[marketIndex].price
|
|
|
|
),
|
|
|
|
marketConfig.quoteDecimals
|
2021-08-14 13:05:31 -07:00
|
|
|
)
|
2021-08-20 06:17:02 -07:00
|
|
|
)
|
|
|
|
) : (
|
|
|
|
'0'
|
|
|
|
)}
|
2021-08-16 06:31:25 -07:00
|
|
|
<LinkButton
|
2021-08-14 13:05:31 -07:00
|
|
|
onClick={() => handleSettlePnl(selectedMarket, perpAccount)}
|
2021-08-16 06:31:25 -07:00
|
|
|
className="ml-2 text-th-primary text-xs disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:underline"
|
|
|
|
disabled={
|
2021-08-16 10:00:43 -07:00
|
|
|
perpAccount
|
|
|
|
? perpAccount
|
|
|
|
.getPnl(
|
|
|
|
mangoGroup.perpMarkets[marketIndex],
|
2021-08-20 13:39:44 -07:00
|
|
|
mangoGroupCache.perpMarketCache[marketIndex],
|
2021-08-16 10:00:43 -07:00
|
|
|
mangoGroupCache.priceCache[marketIndex].price
|
|
|
|
)
|
|
|
|
.eq(ZERO_I80F48)
|
|
|
|
: true
|
2021-08-16 06:31:25 -07:00
|
|
|
}
|
2021-07-20 07:21:58 -07:00
|
|
|
>
|
2021-08-16 06:31:25 -07:00
|
|
|
Settle
|
|
|
|
</LinkButton>
|
|
|
|
</div>
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</FloatingElement>
|
|
|
|
) : (
|
|
|
|
<>
|
2021-07-22 04:34:03 -07:00
|
|
|
<FloatingElement showConnect>
|
2021-08-14 11:16:15 -07:00
|
|
|
<div className={!connected ? 'filter blur' : null}>
|
2021-08-21 19:59:54 -07:00
|
|
|
<ElementTitle>Balances</ElementTitle>
|
2021-08-14 13:05:31 -07:00
|
|
|
{mangoGroup ? (
|
2021-07-22 05:25:18 -07:00
|
|
|
<div className="grid grid-cols-2 grid-rows-1 gap-4 pt-2">
|
2021-08-14 13:05:31 -07:00
|
|
|
{mangoGroupConfig.tokens
|
2021-07-22 04:34:03 -07:00
|
|
|
.filter((t) => t.symbol === baseSymbol || t.symbol === 'USDC')
|
|
|
|
.reverse()
|
|
|
|
.map(({ symbol, mintKey }) => {
|
2021-08-14 13:05:31 -07:00
|
|
|
const tokenIndex = mangoGroup.getTokenIndex(mintKey)
|
2021-07-22 04:34:03 -07:00
|
|
|
return (
|
|
|
|
<div
|
2021-08-16 06:31:25 -07:00
|
|
|
className="border border-th-bkg-4 p-4 rounded-md"
|
2021-07-22 04:34:03 -07:00
|
|
|
key={mintKey.toString()}
|
|
|
|
>
|
2021-08-16 06:31:25 -07:00
|
|
|
<div className="flex items-center justify-between mb-4">
|
2021-07-22 04:34:03 -07:00
|
|
|
<div className="flex items-center">
|
|
|
|
<img
|
|
|
|
alt=""
|
|
|
|
src={`/assets/icons/${symbol.toLowerCase()}.svg`}
|
|
|
|
className={`h-5 mr-2.5 w-auto`}
|
|
|
|
/>
|
|
|
|
<span className="text-th-fgd-2">{symbol}</span>
|
|
|
|
</div>
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-08-20 18:42:59 -07:00
|
|
|
<div className="pb-3">
|
|
|
|
<div className="pb-0.5 text-th-fgd-3 text-xs">
|
2021-08-21 19:59:54 -07:00
|
|
|
Balance
|
2021-08-20 18:42:59 -07:00
|
|
|
</div>
|
2021-07-22 05:25:18 -07:00
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : mangoAccount ? (
|
|
|
|
floorToDecimal(
|
|
|
|
mangoAccount
|
|
|
|
.getUiDeposit(
|
|
|
|
mangoGroupCache.rootBankCache[tokenIndex],
|
|
|
|
mangoGroup,
|
|
|
|
tokenIndex
|
|
|
|
)
|
|
|
|
.toNumber(),
|
2021-08-20 18:42:59 -07:00
|
|
|
tokenPrecision[symbol]
|
2021-08-21 19:59:54 -07:00
|
|
|
) > 0 ? (
|
|
|
|
floorToDecimal(
|
|
|
|
mangoAccount
|
|
|
|
.getUiDeposit(
|
|
|
|
mangoGroupCache.rootBankCache[tokenIndex],
|
|
|
|
mangoGroup,
|
|
|
|
tokenIndex
|
|
|
|
)
|
|
|
|
.toNumber(),
|
|
|
|
tokenPrecision[symbol]
|
|
|
|
)
|
|
|
|
) : ceilToDecimal(
|
|
|
|
mangoAccount
|
|
|
|
.getUiBorrow(
|
|
|
|
mangoGroupCache.rootBankCache[tokenIndex],
|
|
|
|
mangoGroup,
|
|
|
|
tokenIndex
|
|
|
|
)
|
|
|
|
.toNumber(),
|
|
|
|
tokenPrecision[symbol]
|
|
|
|
) > 0 ? (
|
|
|
|
`-${ceilToDecimal(
|
|
|
|
mangoAccount
|
|
|
|
.getUiBorrow(
|
|
|
|
mangoGroupCache.rootBankCache[tokenIndex],
|
|
|
|
mangoGroup,
|
|
|
|
tokenIndex
|
|
|
|
)
|
|
|
|
.toNumber(),
|
|
|
|
tokenPrecision[symbol]
|
|
|
|
)}`
|
|
|
|
) : (
|
|
|
|
0
|
2021-08-20 06:17:02 -07:00
|
|
|
)
|
|
|
|
) : (
|
2021-08-20 18:42:59 -07:00
|
|
|
0
|
2021-08-20 06:17:02 -07:00
|
|
|
)}
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-07-22 05:25:18 -07:00
|
|
|
</div>
|
2021-08-20 18:42:59 -07:00
|
|
|
<div className="pb-3">
|
|
|
|
<div className="pb-0.5 text-th-fgd-3 text-xs">
|
2021-08-21 19:59:54 -07:00
|
|
|
Available Balance
|
2021-08-20 18:42:59 -07:00
|
|
|
</div>
|
2021-07-22 05:25:18 -07:00
|
|
|
<div className={`text-th-fgd-1`}>
|
2021-08-20 06:17:02 -07:00
|
|
|
{isLoading ? (
|
2021-08-21 06:02:51 -07:00
|
|
|
<DataLoader />
|
2021-08-20 06:17:02 -07:00
|
|
|
) : mangoAccount ? (
|
2021-08-23 12:35:59 -07:00
|
|
|
nativeI80F48ToUi(
|
|
|
|
mangoAccount.getAvailableBalance(
|
|
|
|
mangoGroup,
|
|
|
|
mangoGroupCache,
|
|
|
|
tokenIndex
|
|
|
|
),
|
|
|
|
mangoGroup.tokens[tokenIndex].decimals
|
|
|
|
).toFixed(tokenPrecision[symbol])
|
2021-08-20 06:17:02 -07:00
|
|
|
) : (
|
2021-08-20 18:42:59 -07:00
|
|
|
0
|
2021-08-20 06:17:02 -07:00
|
|
|
)}
|
2021-07-22 04:34:03 -07:00
|
|
|
</div>
|
2021-08-23 12:35:59 -07:00
|
|
|
</div>
|
2021-07-22 05:25:18 -07:00
|
|
|
<div>
|
2021-08-23 07:14:03 -07:00
|
|
|
<Tooltip content="Deposit APY / Borrow APR">
|
2021-07-22 05:25:18 -07:00
|
|
|
<div
|
2021-08-20 18:42:59 -07:00
|
|
|
className={`cursor-help font-normal pb-0.5 text-th-fgd-3 default-transition text-xs hover:border-th-bkg-2 hover:text-th-fgd-3`}
|
2021-07-22 05:25:18 -07:00
|
|
|
>
|
|
|
|
Interest Rates
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
2021-08-16 10:00:43 -07:00
|
|
|
<div className={`text-th-fgd-1`}>
|
|
|
|
<span className={`text-th-green`}>
|
|
|
|
{i80f48ToPercent(
|
|
|
|
mangoGroup.getDepositRate(tokenIndex)
|
|
|
|
).toFixed(2)}
|
|
|
|
%
|
|
|
|
</span>
|
|
|
|
<span className={`text-th-fgd-4`}>{' / '}</span>
|
|
|
|
<span className={`text-th-red`}>
|
|
|
|
{i80f48ToPercent(
|
|
|
|
mangoGroup.getBorrowRate(tokenIndex)
|
|
|
|
).toFixed(2)}
|
|
|
|
%
|
|
|
|
</span>
|
|
|
|
</div>
|
2021-07-22 05:25:18 -07:00
|
|
|
</Tooltip>
|
2021-07-20 07:21:58 -07:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-22 04:34:03 -07:00
|
|
|
)
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
) : null}
|
|
|
|
</div>
|
2021-07-20 07:21:58 -07:00
|
|
|
</FloatingElement>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
2021-08-21 06:02:51 -07:00
|
|
|
|
|
|
|
export const DataLoader = () => (
|
|
|
|
<div className="animate-pulse bg-th-bkg-3 h-5 w-10 rounded-sm" />
|
|
|
|
)
|