Stage 1: Course/Module/Lesson CRUD admin UI with TipTap editor

This commit is contained in:
2026-04-07 11:36:27 +05:00
parent 9d82b73e58
commit d356dddc96
30 changed files with 2090 additions and 41 deletions
+34
View File
@@ -0,0 +1,34 @@
"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { cn } from "@/lib/utils";
const links = [
{ href: "/admin/dashboard", label: "Обзор" },
{ href: "/admin/courses", label: "Курсы" },
{ href: "/admin/users", label: "Пользователи" },
];
export function AdminNav() {
const pathname = usePathname();
return (
<>
{links.map(({ href, label }) => (
<Link
key={href}
href={href}
className={cn(
"block px-3 py-2 rounded-lg text-sm transition-colors",
pathname === href || (href !== "/admin/dashboard" && pathname.startsWith(href))
? "bg-slate-700 text-white"
: "text-slate-300 hover:bg-slate-800 hover:text-white"
)}
>
{label}
</Link>
))}
</>
);
}