From 4e1ea0a5a8d11546dddba58c9ac5efa39729c9f7 Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Thu, 22 Feb 2024 18:28:08 +0000
Subject: feature: Introduce a separate sidebar for the mobile

---
 .../app/dashboard/components/ModileSidebarItem.tsx | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 packages/web/app/dashboard/components/ModileSidebarItem.tsx

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

diff --git a/packages/web/app/dashboard/components/ModileSidebarItem.tsx b/packages/web/app/dashboard/components/ModileSidebarItem.tsx
new file mode 100644
index 00000000..9389d2e4
--- /dev/null
+++ b/packages/web/app/dashboard/components/ModileSidebarItem.tsx
@@ -0,0 +1,27 @@
+"use client";
+
+import { cn } from "@/lib/utils";
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+
+export default function MobileSidebarItem({
+  logo,
+  path,
+}: {
+  logo: React.ReactNode;
+  path: string;
+}) {
+  const currentPath = usePathname();
+  return (
+    <li
+      className={cn(
+        "flex w-full rounded-lg hover:bg-gray-50",
+        path == currentPath ? "bg-gray-50" : "",
+      )}
+    >
+      <Link href={path} className="mx-auto px-3 py-2">
+        {logo}
+      </Link>
+    </li>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

