Skip to content

Commit 0355469

Browse files
committed
coding
1 parent 2cfb909 commit 0355469

File tree

11 files changed

+175
-3844
lines changed

11 files changed

+175
-3844
lines changed

DevElevate/Client/src/pages/Coding/Coding.tsx

Lines changed: 1 addition & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,27 @@
11
import React from "react";
22
import { Routes, Route, Link, useLocation } from "react-router-dom";
33
import {
4-
Code2,
5-
Zap,
6-
Trophy,
7-
Users,
8-
ArrowRight,
9-
Play,
10-
Star,
11-
GitBranch,
12-
Target,
13-
BarChart3,
14-
Calendar,
15-
Settings,
164
} from "lucide-react";
175
import { motion } from "framer-motion";
186
import HomePage from "./Pages/HomePage";
197
import ProblemsPage from "./Pages/ProblemsPage";
20-
import ProblemDetailPage from "./Pages/ProblemDetailPage";
21-
import ContestsPage from "./Pages/ContestsPage";
22-
import ContestDetailsPage from "./Pages/ContestDetailsPage";
23-
import ContestProblemPage from "./Pages/ContestProblemPage";
24-
import ContestResultsPage from "./Pages/ContestResultsPage";
25-
import LeaderboardPage from "./Pages/LeaderboardPage";
26-
27-
import AdminDashboard from "./Pages/AdminDashboard";
288

299
const Coding: React.FC = () => {
3010
const location = useLocation();
31-
32-
const navItems = [
33-
{ id: "home", label: "Home", path: "", icon: Code2 },
34-
{ id: "problems", label: "Problems", path: "problems", icon: Target },
35-
{ id: "contests", label: "Contests", path: "contests", icon: Trophy },
36-
{
37-
id: "leaderboard",
38-
label: "Leaderboard",
39-
path: "leaderboard",
40-
icon: BarChart3,
41-
},
42-
];
43-
4411
const isActive = (itemPath: string) => {
4512
const currentPath = location.pathname;
4613
if (itemPath === "") {
4714
return currentPath === "/coding" || currentPath === "/coding/";
4815
}
4916
return currentPath.startsWith(`/coding/${itemPath}`);
5017
};
51-
5218
return (
53-
<div className="min-h-screen bg-gray-900">
54-
{/* Header */}
55-
<header className="border-b border-gray-800 backdrop-blur-sm bg-gray-900/95">
56-
<div className="px-4 py-6 mx-auto max-w-7xl">
57-
<div className="flex justify-between items-center">
58-
{/* Navigation Tabs */}
59-
<nav className="flex p-1 space-x-1 bg-gray-800 rounded-lg">
60-
{navItems.map((item) => {
61-
const Icon = item.icon;
62-
return (
63-
<Link
64-
key={item.id}
65-
to={`/coding/${item.path}`}
66-
className={`flex items-center space-x-2 px-4 py-2 rounded-md text-sm font-medium transition-all duration-200 ${
67-
isActive(item.path)
68-
? "bg-electric-500 text-white shadow-lg shadow-electric-500/25"
69-
: "text-gray-400 hover:text-white hover:bg-gray-700"
70-
}`}
71-
>
72-
<Icon size={16} />
73-
<span>{item.label}</span>
74-
</Link>
75-
);
76-
})}
77-
</nav>
78-
</div>
79-
</div>
80-
</header>
81-
19+
<div className="relative min-h-screen py-24 overflow-hidden bg-gradient-to-b from-gray-900 to-black">
8220
{/* Main Content */}
8321
<main className="px-4 py-8 mx-auto max-w-7xl">
8422
<Routes>
8523
<Route path="/" element={<HomePage />} />
8624
<Route path="/problems" element={<ProblemsPage />} />
87-
<Route path="/problems/:id" element={<ProblemDetailPage />} />
88-
<Route path="/contests" element={<ContestsPage />} />
89-
<Route path="contests/:id" element={<ContestDetailsPage />} />
90-
<Route
91-
path="contests/:contestId/problems/:problemId"
92-
element={<ContestProblemPage />}
93-
/>
94-
<Route
95-
path="/contests/:contestId/results"
96-
element={<ContestResultsPage />}
97-
/>
98-
<Route path="/leaderboard" element={<LeaderboardPage />} />
99-
<Route path="/admin" element={<AdminDashboard />} />
10025
</Routes>
10126
</main>
10227
</div>

0 commit comments

Comments
 (0)