import mangoStore from '@store/mangoStore'
import { useTranslation } from 'next-i18next'
import { NoSymbolIcon } from '@heroicons/react/20/solid'
import SheenLoader from '@components/shared/SheenLoader'
import PerpPositionsStatsTable from './PerpPositionsStatsTable'
const PerpMarketsPositions = () => {
const { t } = useTranslation('stats')
return (
<>
{t('stats:largest-perp-positions')}
{t('stats:closest-to-liquidation')}
>
)
}
export default PerpMarketsPositions
const LargestPerpPositions = () => {
const { t } = useTranslation(['common', 'stats', 'trade'])
const positions = mangoStore((s) => s.perpStats.positions.largest)
const loading = mangoStore((s) => s.perpStats.positions.loading)
return positions.length ? (
) : loading ? (
) : (
)
}
const ClosestToLiquidation = () => {
const { t } = useTranslation(['common', 'stats', 'trade'])
const positions = mangoStore((s) => s.perpStats.positions.closestToLiq)
const loading = mangoStore((s) => s.perpStats.positions.loading)
return positions.length ? (
) : loading ? (
) : (
)
}
const Loader = () => {
return (
{[...Array(5)].map((x, i) => (
))}
)
}
const EmptyState = ({ text }: { text: string }) => {
return (
)
}