aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/sidebar/ModileSidebarItem.tsx
blob: 4d3436eae5b66cc15da6ea98c7c14fe3ebaf5aa4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>
  );
}