diff --git a/src/app/(student)/layout.tsx b/src/app/(student)/layout.tsx index 3f1b92d..3d8557c 100644 --- a/src/app/(student)/layout.tsx +++ b/src/app/(student)/layout.tsx @@ -44,6 +44,9 @@ export default async function StudentLayout({ children }: { children: React.Reac {schoolName}
{session.user.name}
diff --git a/src/components/admin/admin-nav.tsx b/src/components/admin/admin-nav.tsx index edc55b4..b0a159f 100644 --- a/src/components/admin/admin-nav.tsx +++ b/src/components/admin/admin-nav.tsx @@ -9,13 +9,14 @@ const links = [ { href: "/admin/categories", label: "Категории" }, { href: "/admin/users", label: "Пользователи" }, { href: "/curator/homework", label: "ДЗ на проверку" }, + { href: "/admin/questions", label: "Вопросы" }, { href: "/admin/quizzes", label: "Тесты" }, { href: "/admin/comments", label: "Комментарии" }, { href: "/admin/import-export", label: "Импорт / Экспорт" }, { href: "/admin/settings", label: "Настройки" }, ]; -export function AdminNav() { +export function AdminNav({ questionsBadge = 0 }: { questionsBadge?: number }) { const pathname = usePathname(); return ( @@ -24,7 +25,7 @@ export function AdminNav() { const active = pathname === href || (href !== "/admin/dashboard" && href !== "/curator/homework" && pathname.startsWith(href)) || - (href === "/curator/homework" && pathname.startsWith("/curator")); + (href === "/curator/homework" && pathname.startsWith("/curator/homework")); return ( - {label} + + {label} + {href === "/admin/questions" && questionsBadge > 0 && ( + + {questionsBadge} + + )} + ); })} diff --git a/src/components/admin/admin-shell.tsx b/src/components/admin/admin-shell.tsx index a0227ef..8b388be 100644 --- a/src/components/admin/admin-shell.tsx +++ b/src/components/admin/admin-shell.tsx @@ -4,9 +4,11 @@ import { LogoutButton } from "@/components/layout/logout-button"; export function AdminShell({ children, userName, + questionsBadge = 0, }: { children: React.ReactNode; userName: string; + questionsBadge?: number; }) { return (