mirror of
https://github.com/ershisan99/www.git
synced 2025-12-18 05:19:23 +00:00
show current sorting position alongside the rank
This commit is contained in:
@@ -1,22 +1,12 @@
|
||||
import { GithubLinks } from '@/app/_components/github-links'
|
||||
import { ModeToggle } from '@/components/mode-toggle'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { DropdownMenuTrigger } from '@/components/ui/dropdown-menu'
|
||||
import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'
|
||||
import { SiGithub } from '@icons-pack/react-simple-icons'
|
||||
import {
|
||||
Award,
|
||||
BookOpen,
|
||||
ChevronRight,
|
||||
Info,
|
||||
Menu,
|
||||
MessageSquare,
|
||||
Trophy,
|
||||
Users,
|
||||
} from 'lucide-react'
|
||||
import { ChevronRight, MessageSquare, Trophy, Users } from 'lucide-react'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className='flex min-h-screen flex-col'>
|
||||
|
||||
@@ -348,6 +348,7 @@ function RawLeaderboardTable({
|
||||
<Table>
|
||||
<TableHeader className='sticky top-0 z-10 bg-white dark:bg-zinc-900'>
|
||||
<TableRow className='bg-gray-50 dark:bg-zinc-800/50'>
|
||||
<TableHead className='w-[40px] text-right'>#</TableHead>
|
||||
<TableHead className='w-[80px]'>
|
||||
<SortableHeader
|
||||
className='w-full justify-end'
|
||||
@@ -468,6 +469,9 @@ function RawLeaderboardTable({
|
||||
'transition-colors hover:bg-gray-50 dark:hover:bg-zinc-800/70'
|
||||
)}
|
||||
>
|
||||
<TableCell className='w-10 text-right font-medium'>
|
||||
{virtualRow.index + 1}
|
||||
</TableCell>
|
||||
<TableCell className='w-28 font-medium'>
|
||||
<div className='flex items-center justify-end gap-1.5 pr-4.5 font-mono'>
|
||||
<span className={cn(entry.rank < 10 && 'ml-[1ch]')}>
|
||||
|
||||
Reference in New Issue
Block a user