Admin-Panel hinzugefügt
This commit is contained in:
@@ -3,8 +3,12 @@ import Link from "next/link";
|
||||
import { prisma } from "@repo/db";
|
||||
import { ChangelogWrapper } from "_components/navbar/ChangelogWrapper";
|
||||
import ModeSwitchDropdown from "_components/navbar/ModeSwitchDropdown";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { getServerSession } from "api/auth/[...nextauth]/auth";
|
||||
import AdminPanel from "_components/navbar/AdminPanel";
|
||||
|
||||
export default async function Navbar({ children }: { children: React.ReactNode }) {
|
||||
const session = await getServerSession();
|
||||
const latestChangelog = await prisma.changelog.findFirst({
|
||||
orderBy: {
|
||||
createdAt: "desc",
|
||||
@@ -17,6 +21,7 @@ export default async function Navbar({ children }: { children: React.ReactNode }
|
||||
<p className="text-xl font-semibold normal-case">VAR Operations Center</p>
|
||||
<ChangelogWrapper latestChangelog={latestChangelog} />
|
||||
</div>
|
||||
{session?.user.permissions.includes("ADMIN_KICK") && <AdminPanel />}
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user