Phase 7
This commit is contained in:
189 files changed
+9873
-655
No files matched your search
@@ -2,6 +2,7 @@ import { redirect } from "next/navigation";
|
||||
import { auth } from "@/auth";
|
||||
import { StaffShell } from "@/components/navigation/staff-shell";
|
||||
import { prisma } from "@/lib/db/prisma";
|
||||
import { getUnreadNotificationCount } from "@/services/notifications/notification.service";
|
||||
|
||||
export default async function StaffLayout({ children }: { children: React.ReactNode }) {
|
||||
const session = await auth();
|
||||
@@ -18,5 +19,11 @@ export default async function StaffLayout({ children }: { children: React.ReactN
|
||||
redirect("/home");
|
||||
}
|
||||
|
||||
return <StaffShell>{children}</StaffShell>;
|
||||
const unreadNotificationCount = await getUnreadNotificationCount(prisma, session.user.id);
|
||||
|
||||
return (
|
||||
<StaffShell notificationsHref="/staff/notifications" unreadNotificationCount={unreadNotificationCount}>
|
||||
{children}
|
||||
</StaffShell>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user