-
-
-
+
+ {Array.from({ length: 8 }).map((_, index) => (
+
+
+
+
+
+
+ ))}
) : error ? (
@@ -106,101 +70,19 @@ export default function LeaderboardPage() {
) : players.length === 0 ? (
) : (
-
-
-
-
-
- |
- Rank
- |
-
- Player
- |
-
- Points
- |
-
- Win Rate
- |
-
- Bets
- |
-
-
-
- {players.map((player, index) => {
- const isCurrentUser = player.address === publicKey;
- return (
-
- |
-
- {index + 1}
-
- |
-
-
-
- {player.displayName || truncateAddress(player.address)}
-
- {isCurrentUser && (
-
- You
-
- )}
-
- |
-
- {player.points.toLocaleString()}
- |
-
- = 50
- ? "text-accent-mint"
- : "text-accent-red"
- }
- >
- {player.winRate}%
-
- |
-
- {player.totalBets}
- |
-
- );
- })}
-
-
-
+
+
)}
);
}
-
-// Helper function used inside the component
-function truncateAddress(addr: string): string {
- if (!addr || addr.length <= 10) return addr;
- return `${addr.slice(0, 4)}...${addr.slice(-4)}`;
-}
diff --git a/frontend/src/app/markets/[id]/page.tsx b/frontend/src/app/markets/[id]/page.tsx
index 858aefc..8c2c816 100644
--- a/frontend/src/app/markets/[id]/page.tsx
+++ b/frontend/src/app/markets/[id]/page.tsx
@@ -14,10 +14,6 @@ import {
calculatePayout,
truncateAddress,
} from "@/utils/helpers";
-import { displayXLM, formatXLM, calculatePayout, truncateAddress, formatTime} from "@/utils/helpers";
-import { displayXLM, formatXLM, calculatePayout, truncateAddress, formatTime } from "@/utils/helpers";
-import { displayXLM, formatXLM, calculatePayout, truncateAddress, formatEventTime } from "@/utils/helpers";
-import { displayXLM, formatTime, formatXLM, calculatePayout, truncateAddress } from "@/utils/helpers";
import {
WIN_POINTS,
LOSE_POINTS,
@@ -34,12 +30,6 @@ import TxProgress from "@/components/ui/TxProgress";
import ErrorBoundary from "@/components/ui/ErrorBoundary";
import Button from "@/components/ui/Button";
import type { MarketEvent } from "@/types";
-import {
- calculatePayout,
- displayXLM,
- formatXLM,
- truncateAddress,
-} from "@/utils/helpers";
import { FiClock, FiUsers, FiTrendingUp, FiAward, FiArrowLeft } from "react-icons/fi";
import Link from "next/link";
@@ -335,7 +325,6 @@ export default function MarketDetailPage({