diff --git a/src/app/leaderboards/components/LeaderboardRow.tsx b/src/app/leaderboards/components/LeaderboardRow.tsx
index fde8889..8458976 100644
--- a/src/app/leaderboards/components/LeaderboardRow.tsx
+++ b/src/app/leaderboards/components/LeaderboardRow.tsx
@@ -1,3 +1,4 @@
+import Rank from "@/components/app/Rank";
import { LinkIcon, Trophy } from "lucide-react";
import Link from "next/link";
@@ -17,20 +18,6 @@ const LeaderboardRow = ({
index?: number;
run: GlobalLeaderboardUser;
}) => {
- const getRankStyle = (rank: number) => {
- if (rank === 1) return "rank-gold";
- if (rank === 2) return "rank-silver";
- if (rank === 3) return "rank-bronze";
- return "bg-secondary text-muted-foreground";
- };
-
- const getRankGlow = (rank: number) => {
- if (rank === 1) return "glow-gold";
- if (rank === 2) return "glow-silver";
- if (rank === 3) return "glow-bronze";
- return "";
- };
-
const isTopThree = run.rank <= 3;
return (
@@ -45,13 +32,7 @@ const LeaderboardRow = ({
>
{/* Rank */}
-
- {isTopThree ? : run.rank}
-
+
|
{/* Username */}
diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx
index 1b4411f..562878f 100644
--- a/src/app/profile/page.tsx
+++ b/src/app/profile/page.tsx
@@ -8,6 +8,7 @@ import { Button } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import ProfileStatCard from "@/app/profile/components/ProfileStatCard";
+import Rank from "@/components/app/Rank";
export default function Profile() {
const user = {
@@ -34,8 +35,8 @@ export default function Profile() {
{user.username[0].toUpperCase()}
-
diff --git a/src/app/run/page.tsx b/src/app/run/page.tsx
index aa5b2ca..4753b42 100644
--- a/src/app/run/page.tsx
+++ b/src/app/run/page.tsx
@@ -9,7 +9,7 @@ import Editor from "./components/Editor";
import useAction from "@/hook/use-action";
import { getLiveRun } from "@/modules/live-run/actions";
import ProblemCard from "../problems/components/ProblemCard";
-import ProfileCard from "@/components/app/ProfileCard";
+import ProfileCard from "./components/ProfileCard";
export default function Run() {
const [runInfo] = useAction(getLiveRun);
@@ -28,13 +28,13 @@ export default function Run() {
pt-20 sm:pt-24
pb-6 sm:pb-12
flex flex-col lg:flex-row
- gap-6 lg:gap-8
+ gap-5
"
>
{/* Main column */}
{/* Top cards */}
-
+
@@ -80,7 +80,7 @@ export default function Run() {
{/* Code */}
-
+
diff --git a/src/components/app/ProfileCard.tsx b/src/components/app/ProfileCard.tsx
deleted file mode 100644
index 4550535..0000000
--- a/src/components/app/ProfileCard.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Badge } from "../ui/badge";
-import { Card, CardContent } from "../ui/card";
-
-export default function ProfileCard({
- user,
-}: {
- user: { username: string; rank: number };
-}) {
- return (
-
-
-
-
- {/* Avatar */}
-
-

-
-
- #{user.rank}
-
-
-
- {/* User Info */}
-
-
{user.username}
- World Record Holder
-
-
-
- );
-}