diff --git a/src/app/(home)/leaderboards/layout.tsx b/src/app/(home)/leaderboards/layout.tsx
deleted file mode 100644
index b0196d4..0000000
--- a/src/app/(home)/leaderboards/layout.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { MainHeader } from '@/components/header'
-import type { ReactNode } from 'react'
-
-export default function RootLayout({
- children,
-}: Readonly<{ children: ReactNode }>) {
- return (
- <>
-
- {children}
- >
- )
-}
diff --git a/src/app/(home)/leaderboards/page.tsx b/src/app/(home)/leaderboards/page.tsx
index d822b10..03c1bef 100644
--- a/src/app/(home)/leaderboards/page.tsx
+++ b/src/app/(home)/leaderboards/page.tsx
@@ -20,7 +20,6 @@ export default async function Home() {
return (
- {/**/}
diff --git a/src/app/_components/leaderboard.tsx b/src/app/_components/leaderboard.tsx
index c483b16..903bff5 100644
--- a/src/app/_components/leaderboard.tsx
+++ b/src/app/_components/leaderboard.tsx
@@ -1,13 +1,13 @@
'use client'
import type React from 'react'
-import { useCallback } from 'react'
-import { memo } from 'react'
-import { useEffect } from 'react'
-import { useMemo } from 'react'
import {
type ComponentPropsWithoutRef,
Fragment,
+ memo,
+ useCallback,
+ useEffect,
+ useMemo,
useRef,
useState,
} from 'react'
@@ -25,7 +25,7 @@ import {
TableHeader,
TableRow,
} from '@/components/ui/table'
-import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
+import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'
import { cn } from '@/lib/utils'
import { RANKED_CHANNEL, VANILLA_CHANNEL } from '@/shared/constants'
import { api } from '@/trpc/react'
@@ -43,12 +43,14 @@ import {
} from 'lucide-react'
import Link from 'next/link'
import { useRouter, useSearchParams } from 'next/navigation'
+
const getMedal = (rank: number) => {
if (rank === 1) return
if (rank === 2) return
if (rank === 3) return
return null
}
+
export function LeaderboardPage() {
const router = useRouter()
const searchParams = useSearchParams()
@@ -165,96 +167,66 @@ export function LeaderboardPage() {
[sortColumn, sortDirection]
)
- // Get medal for top 3 players
-
return (
-
-
-
-
-
-
-
-
- Leaderboards
-
-
- View player rankings and statistics
-
-
-
-
-
-
-
- {currentLeaderboard.length} Players
-
-
-
-
-
-
-
-
-
-
- Ranked Leaderboard
- Vanilla Leaderboard
-
-
-
-
-
- {gamesAmount[0]}
-
- {gamesAmount[1]}
-
+
+
+
+
+
+
+ Ranked Leaderboard
+ Vanilla Leaderboard
+
+
+
+
+
+ {gamesAmount[0]}
+
+ {gamesAmount[1]}
-
-
-
-
- setSearchQuery(e.target.value)}
- />
-
+
+
+
+
+
+ setSearchQuery(e.target.value)}
+ />
+
-
-
-
-
-
+
+
+
+