diff --git a/src/app/protected/trainings/[trainingId]/page.tsx b/src/app/protected/trainings/[trainingId]/page.tsx index 058462f7..6ff7eb06 100644 --- a/src/app/protected/trainings/[trainingId]/page.tsx +++ b/src/app/protected/trainings/[trainingId]/page.tsx @@ -1,7 +1,7 @@ "use client"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; -import { BookOpen, Users, Trophy, Bell } from "lucide-react"; +import { BookOpen, Users, Trophy } from "lucide-react"; import { TypographyH1 } from "@/components/ui/typography"; import { useTrainingContext } from "@/providers/training"; import { useParams } from "next/navigation"; @@ -73,29 +73,8 @@ export default function TrainingOverviewPage() { -
- - - - - Announcements - - - Important updates and news about this training - - - -
- -

No announcements yet.

-

- Check back later for updates -

-
-
-
- - +
+ Quick Actions @@ -103,28 +82,25 @@ export default function TrainingOverviewPage() { -
-
-
-

View Materials

-

Access training resources

-
- -
-
-
-

Join Contests

-

Participate in competitions

-
- -
-
-
-

Check Leaderboard

-

See your ranking

-
- -
+ diff --git a/src/components/training/TrainingNavigation.tsx b/src/components/training/TrainingNavigation.tsx index f0a9b46a..c89f601e 100644 --- a/src/components/training/TrainingNavigation.tsx +++ b/src/components/training/TrainingNavigation.tsx @@ -3,13 +3,9 @@ import Link from "next/link"; import React from "react"; import { Button } from "@/components/ui/button"; import { cn } from "@/lib/utils"; +import { Home, BookOpen, Trophy, Users } from "lucide-react"; -export type TrainingNavLink = { - href: string; - label: string; -}; - -export async function TrainingNavigation({ +export function TrainingNavigation({ trainingId, className = "", }: { @@ -19,17 +15,11 @@ export async function TrainingNavigation({ // Fetch permissions for the user // Define navigation links - const links: TrainingNavLink[] = [ - { href: `/protected/trainings/${trainingId}`, label: "Overview" }, - { - href: `/protected/trainings/${trainingId}/materials`, - label: "Materials", - }, - { href: `/protected/trainings/${trainingId}/contests`, label: "Contests" }, - { - href: `/protected/trainings/${trainingId}/leaderboard`, - label: "Leaderboard", - }, + const links = [ + { href: `/protected/trainings/${trainingId}`, label: "Overview", icon: }, + { href: `/protected/trainings/${trainingId}/materials`, label: "Materials", icon: }, + { href: `/protected/trainings/${trainingId}/contests`, label: "Contests", icon: }, + { href: `/protected/trainings/${trainingId}/leaderboard`, label: "Leaderboard", icon: }, ]; // Only show links the user has permission for, or always Overview if any permission @@ -42,9 +32,11 @@ export async function TrainingNavigation({ variant="ghost" size="sm" asChild - className="font-medium" + className="font-medium flex items-center gap-2" > - {link.label} + + {link.icon} {link.label} + ))}