aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/shared/sidebar/ModileSidebarItem.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/shared/sidebar/ModileSidebarItem.tsx')
-rw-r--r--apps/web/components/shared/sidebar/ModileSidebarItem.tsx27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/web/components/shared/sidebar/ModileSidebarItem.tsx b/apps/web/components/shared/sidebar/ModileSidebarItem.tsx
new file mode 100644
index 00000000..4d3436ea
--- /dev/null
+++ b/apps/web/components/shared/sidebar/ModileSidebarItem.tsx
@@ -0,0 +1,27 @@
+"use client";
+
+import Link from "next/link";
+import { usePathname } from "next/navigation";
+import { cn } from "@/lib/utils";
+
+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-background",
+ path == currentPath ? "bg-background" : "",
+ )}
+ >
+ <Link href={path} className="m-auto px-3 py-2">
+ {logo}
+ </Link>
+ </li>
+ );
+}