touch up a little

This commit is contained in:
2025-04-04 02:38:04 +02:00
parent 04783d5795
commit 31cb676567

View File

@@ -259,6 +259,7 @@ function LeaderboardTable({
<TableRow className=' bg-slate-50 dark:bg-slate-800/50'> <TableRow className=' bg-slate-50 dark:bg-slate-800/50'>
<TableHead className='w-[80px]'> <TableHead className='w-[80px]'>
<SortableHeader <SortableHeader
className='w-full justify-end'
column='rank' column='rank'
label='Rank' label='Rank'
currentSort={sortColumn} currentSort={sortColumn}
@@ -366,8 +367,8 @@ function LeaderboardTable({
'transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/70' 'transition-colors hover:bg-slate-50 dark:hover:bg-slate-800/70'
)} )}
> >
<TableCell className='font-medium'> <TableCell className='w-24 font-medium'>
<div className='flex items-center gap-1.5'> <div className='flex items-center justify-end gap-1.5 pr-4.5 font-mono'>
{getMedal(entry.rank)} {getMedal(entry.rank)}
<span>{entry.rank}</span> <span>{entry.rank}</span>
</div> </div>
@@ -377,15 +378,6 @@ function LeaderboardTable({
href={`/players/${entry.id}`} href={`/players/${entry.id}`}
className='flex items-center gap-2 hover:underline' className='flex items-center gap-2 hover:underline'
> >
{/*<Avatar className='h-8 w-8'>*/}
{/* <AvatarImage*/}
{/* src={`https://cdn.discordapp.com/avatars/${entry.id}/avatar.png`}*/}
{/* alt={entry.name}*/}
{/* />*/}
{/* <AvatarFallback className='bg-violet-100 text-violet-700 text-xs dark:bg-violet-900 dark:text-violet-300'>*/}
{/* {entry.name.slice(0, 2).toUpperCase()}*/}
{/* </AvatarFallback>*/}
{/*</Avatar>*/}
<span className='font-medium'>{entry.name}</span> <span className='font-medium'>{entry.name}</span>
{entry.streak >= 3 && ( {entry.streak >= 3 && (
<Badge className='bg-orange-500 text-white'> <Badge className='bg-orange-500 text-white'>
@@ -395,7 +387,7 @@ function LeaderboardTable({
)} )}
</Link> </Link>
</TableCell> </TableCell>
<TableCell className='text-right font-medium font-mono'> <TableCell className='pr-7 text-right font-medium font-mono'>
{Math.round(entry.mmr)} {Math.round(entry.mmr)}
</TableCell> </TableCell>
<TableCell className='text-right font-mono'> <TableCell className='text-right font-mono'>
@@ -498,15 +490,17 @@ function SortableHeader({
onClick={() => onSort(column)} onClick={() => onSort(column)}
> >
{label} {label}
{isActive ? ( <span className={'flex w-4 items-center justify-center'}>
direction === 'asc' ? ( {isActive ? (
<ArrowUp className='h-3.5 w-3.5' /> direction === 'asc' ? (
<ArrowUp className='h-3.5 w-3.5' />
) : (
<ArrowDown className='h-3.5 w-3.5' />
)
) : ( ) : (
<ArrowDown className='h-3.5 w-3.5' /> <ArrowUpDown className='h-3.5 w-3.5 opacity-50' />
) )}
) : ( </span>
<ArrowUpDown className='h-3.5 w-3.5 opacity-50' />
)}
</button> </button>
) )
} }