import MedalIcon from '@components/icons/MedalIcon' import ProfileImage from '@components/profile/ProfileImage' import SheenLoader from '@components/shared/SheenLoader' import { ChevronRightIcon } from '@heroicons/react/20/solid' import { useViewport } from 'hooks/useViewport' import { formatCurrencyValue } from 'utils/numbers' import { breakpoints } from 'utils/theme' import { LeaderboardRes } from './LeaderboardPage' const LeaderboardTable = ({ data, loading, }: { data: LeaderboardRes[] loading: boolean }) => { return ( <> {/*

{t('rank')}

{t('trader')}

{t('pnl')}

*/}
{data.map((d, i) => ( ))}
) } export default LeaderboardTable const LeaderboardRow = ({ item, loading, rank, }: { item: LeaderboardRes loading?: boolean rank: number }) => { const { profile_name, profile_image_url, mango_account, pnl, wallet_pk } = item const { width } = useViewport() const isMobile = width ? width < breakpoints.md : false return !loading ? (

{rank}

{rank < 4 ? : null}

{profile_name || wallet_pk.slice(0, 4) + '...' + wallet_pk.slice(-4)}

Acc: {mango_account.slice(0, 4) + '...' + mango_account.slice(-4)}

{formatCurrencyValue(pnl, 2)}
) : (
) }