@@ -155,44 +204,55 @@ export function LeaderboardPage() {
onValueChange={handleTabChange}
className='flex flex-1 flex-col p-4 md:p-6'
>
-
+
Ranked Leaderboard
Vanilla Leaderboard
-
-
-
-
setSearchQuery(e.target.value)}
- />
+
+
+
+
+ {gamesAmount[0]}
+
+ {gamesAmount[1]}
+
+
+
+
+
+
+ setSearchQuery(e.target.value)}
+ />
+
+
-
+
-
-
-
-
-
+
@@ -207,16 +267,14 @@ interface LeaderboardTableProps {
sortDirection: 'asc' | 'desc'
onSort: (column: string) => void
getMedal: (rank: number) => React.ReactNode
- type: string
}
-function LeaderboardTable({
+function RawLeaderboardTable({
leaderboard,
sortColumn,
sortDirection,
onSort,
getMedal,
- type,
}: LeaderboardTableProps) {
const tableContainerRef = useRef
(null)
@@ -499,3 +557,6 @@ function SortableHeader({
)
}
+
+export const LeaderboardTable = memo(RawLeaderboardTable)
+LeaderboardTable.displayName = 'LeaderboardTable'
diff --git a/src/components/ui/slider.tsx b/src/components/ui/slider.tsx
index 09391e8..d111e23 100644
--- a/src/components/ui/slider.tsx
+++ b/src/components/ui/slider.tsx
@@ -1,9 +1,9 @@
-"use client"
+'use client'
-import * as React from "react"
-import * as SliderPrimitive from "@radix-ui/react-slider"
+import * as SliderPrimitive from '@radix-ui/react-slider'
+import * as React from 'react'
-import { cn } from "@/lib/utils"
+import { cn } from '@/lib/utils'
function Slider({
className,
@@ -25,35 +25,35 @@ function Slider({
return (
{Array.from({ length: _values.length }, (_, index) => (
))}