diff --git a/src/app/problems/page.tsx b/src/app/problems/page.tsx
index 7af1c4f..57764bd 100644
--- a/src/app/problems/page.tsx
+++ b/src/app/problems/page.tsx
@@ -9,7 +9,7 @@ import { Button } from "@/components/ui/button";
import { Badge } from "@/components/ui/badge";
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
-const Problems = () => {
+export default function Problems() {
const [viewMode, setViewMode] = useState<"grid" | "list">("grid");
const categories = ["All", "Arrays", "Trees", "Graphs", "DP", "Strings"];
@@ -90,9 +90,7 @@ const Problems = () => {
);
-};
-
-export default Problems;
+}
/* ---------------- data ---------------- */
diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx
index 30bda86..879b001 100644
--- a/src/app/profile/page.tsx
+++ b/src/app/profile/page.tsx
@@ -1,15 +1,15 @@
-import {
- Trophy,
- Timer,
- Zap,
- Target,
- Calendar,
- TrendingUp,
- Award,
-} from "lucide-react";
+"use client";
+
+import { Trophy, Timer, Zap, Target, Calendar, Award } from "lucide-react";
+
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { Badge } from "@/components/ui/badge";
+import { Button } from "@/components/ui/button";
+import { Separator } from "@/components/ui/separator";
+
import StatCard from "@/components/app/StatCard";
-const Profile = () => {
+export default function Profile() {
const user = {
username: "speedmaster_x",
joinDate: "Jan 2024",
@@ -21,139 +21,49 @@ const Profile = () => {
favoriteCategory: "Any%",
};
- const recentRuns = [
- {
- id: 1,
- category: "Any%",
- time: "2:38.54",
- date: "2 hours ago",
- status: "clean",
- },
- {
- id: 2,
- category: "Any%",
- time: "2:45.12",
- date: "3 hours ago",
- status: "clean",
- },
- {
- id: 3,
- category: "Easy Only",
- time: "1:23.45",
- date: "5 hours ago",
- status: "clean",
- },
- {
- id: 4,
- category: "Any%",
- time: "--:--",
- date: "5 hours ago",
- status: "reset",
- },
- {
- id: 5,
- category: "Any%",
- time: "2:51.33",
- date: "Yesterday",
- status: "clean",
- },
- {
- id: 6,
- category: "No DP",
- time: "3:45.67",
- date: "Yesterday",
- status: "clean",
- },
- ];
-
- const achievements = [
- {
- name: "First Blood",
- description: "Complete your first run",
- icon: Zap,
- unlocked: true,
- },
- {
- name: "Sub-3 Club",
- description: "Finish a run under 3 minutes",
- icon: Timer,
- unlocked: true,
- },
- {
- name: "World Record",
- description: "Hold a world record",
- icon: Trophy,
- unlocked: true,
- },
- {
- name: "Century",
- description: "Complete 100 runs",
- icon: Target,
- unlocked: true,
- },
- {
- name: "Perfectionist",
- description: "100 clean runs",
- icon: Award,
- unlocked: false,
- },
- {
- name: "Marathon",
- description: "10 hours of running",
- icon: Calendar,
- unlocked: true,
- },
- ];
-
return (
-
+
{/* Profile Header */}
-
- {/* Background gradient */}
-
+
+
-
+
{/* Avatar */}
-
- {user.username.charAt(0).toUpperCase()}
+
+ {user.username[0].toUpperCase()}
- #1
+ #{user.rank}
{/* User Info */}
-
- {user.username}
-
+
{user.username}
Runner since {user.joinDate}
-
-
- World Record Holder
-
-
- {user.favoriteCategory} Main
-
+
+
+ World Record Holder
+ {user.favoriteCategory} Main
- {/* Quick Stats */}
+ {/* PB */}
-
-
+
+
- {/* Stats Grid */}
-
+ {/* Stats */}
+
{
{/* Recent Runs */}
-
-
-
-
- Recent Runs
-
-
-
+
+
+ Recent Runs
+
+
-
- {recentRuns.map((run, i) => (
-
-
-
-
-
- {run.category}
-
-
- {run.date}
-
-
-
-
-
- {run.time}
-
-
- {run.status}
+
+ {recentRuns.map((run, i) => (
+
+
+
+
+
{run.category}
+
+ {run.date}
- ))}
-
-
-
- {/* Achievements */}
-
-
-
-
- Achievements
-
- 5/6
-
+
+
+ {run.time}
+
+
+ {run.status}
+
+
+
+ ))}
+
+
-
- {achievements.map((achievement, i) => (
+ {/* Achievements + PB */}
+
+
+
+ Achievements
+ 5 / 6
+
+
+
+ {achievements.map((a, i) => (
{
>
+
-
- {achievement.name}
-
+
{a.name}
- {achievement.description}
+ {a.description}
- {achievement.unlocked && (
+
+ {a.unlocked && (
@@ -307,44 +202,124 @@ const Profile = () => {
)}
))}
-
-
+
+
{/* PB History */}
-
-
- PB History
-
-
-
- 2:34.21
- Today
-
-
- 2:38.54
-
- 3 days ago
-
-
-
- 2:45.12
-
- 1 week ago
-
-
-
- 2:52.33
-
- 2 weeks ago
-
-
-
-
+
+
+ PB History
+
+
+ {pbHistory.map((pb, i) => (
+
+
+ {pb.time}
+ {pb.date}
+
+ {i !== pbHistory.length - 1 && (
+
+ )}
+
+ ))}
+
+
);
-};
+}
-export default Profile;
+/* ---------------- data ---------------- */
+
+const recentRuns = [
+ {
+ id: 1,
+ category: "Any%",
+ time: "2:38.54",
+ date: "2 hours ago",
+ status: "clean",
+ },
+ {
+ id: 2,
+ category: "Any%",
+ time: "2:45.12",
+ date: "3 hours ago",
+ status: "clean",
+ },
+ {
+ id: 3,
+ category: "Easy Only",
+ time: "1:23.45",
+ date: "5 hours ago",
+ status: "clean",
+ },
+ {
+ id: 4,
+ category: "Any%",
+ time: "--:--",
+ date: "5 hours ago",
+ status: "reset",
+ },
+ {
+ id: 5,
+ category: "Any%",
+ time: "2:51.33",
+ date: "Yesterday",
+ status: "clean",
+ },
+ {
+ id: 6,
+ category: "No DP",
+ time: "3:45.67",
+ date: "Yesterday",
+ status: "clean",
+ },
+];
+
+const achievements = [
+ {
+ name: "First Blood",
+ description: "Complete your first run",
+ icon: Zap,
+ unlocked: true,
+ },
+ {
+ name: "Sub-3 Club",
+ description: "Finish a run under 3 minutes",
+ icon: Timer,
+ unlocked: true,
+ },
+ {
+ name: "World Record",
+ description: "Hold a world record",
+ icon: Trophy,
+ unlocked: true,
+ },
+ {
+ name: "Century",
+ description: "Complete 100 runs",
+ icon: Target,
+ unlocked: true,
+ },
+ {
+ name: "Perfectionist",
+ description: "100 clean runs",
+ icon: Award,
+ unlocked: false,
+ },
+ {
+ name: "Marathon",
+ description: "10 hours of running",
+ icon: Calendar,
+ unlocked: true,
+ },
+];
+
+const pbHistory = [
+ { time: "2:34.21", date: "Today" },
+ { time: "2:38.54", date: "3 days ago" },
+ { time: "2:45.12", date: "1 week ago" },
+ { time: "2:52.33", date: "2 weeks ago" },
+];
diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsx
new file mode 100644
index 0000000..4c24b2a
--- /dev/null
+++ b/src/components/ui/separator.tsx
@@ -0,0 +1,28 @@
+"use client"
+
+import * as React from "react"
+import { Separator as SeparatorPrimitive } from "radix-ui"
+
+import { cn } from "@/lib/utils"
+
+function Separator({
+ className,
+ orientation = "horizontal",
+ decorative = true,
+ ...props
+}: React.ComponentProps
) {
+ return (
+
+ )
+}
+
+export { Separator }