-
-
-
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}
+
))}