feat(nav): visible Admin Panel link in navbar for admins
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -108,6 +108,14 @@ export function Navbar({ user }: { user?: NavUser | null }) {
|
|||||||
{t("pricing")}
|
{t("pricing")}
|
||||||
</Link>
|
</Link>
|
||||||
<NavbarLearnDropdown items={learnItems} label={t("learn")} />
|
<NavbarLearnDropdown items={learnItems} label={t("learn")} />
|
||||||
|
{user?.isAdmin && (
|
||||||
|
<Link
|
||||||
|
href="/admin"
|
||||||
|
className="rounded-md px-3 py-2 text-sm font-semibold text-indigo-600 transition-colors hover:bg-indigo-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2"
|
||||||
|
>
|
||||||
|
{t("menuAdminPanel")}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{/* Right-side actions */}
|
{/* Right-side actions */}
|
||||||
|
|||||||
Reference in New Issue
Block a user