From 7ddcfb630d3dec3d9fecbfd6a498ca7c572809ec Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Fri, 1 Mar 2024 23:17:27 +0000
Subject: feature: Add an admin page showing server stats and actions

---
 packages/web/app/dashboard/components/Sidebar.tsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'packages/web/app/dashboard/components/Sidebar.tsx')

diff --git a/packages/web/app/dashboard/components/Sidebar.tsx b/packages/web/app/dashboard/components/Sidebar.tsx
index 010ee103..29e5baed 100644
--- a/packages/web/app/dashboard/components/Sidebar.tsx
+++ b/packages/web/app/dashboard/components/Sidebar.tsx
@@ -6,6 +6,7 @@ import {
   PackageOpen,
   Settings,
   Search,
+  Shield,
 } from "lucide-react";
 import { redirect } from "next/navigation";
 import SidebarItem from "./SidebarItem";
@@ -61,6 +62,13 @@ export default async function Sidebar() {
             name="Settings"
             path="/dashboard/settings"
           />
+          {session.user.role == "admin" && (
+            <SidebarItem
+              logo={<Shield />}
+              name="Admin"
+              path="/dashboard/admin"
+            />
+          )}
         </ul>
       </div>
       <Separator />
-- 
cgit v1.2.3-70-g09d2

