diff options
| author | Mohamed Bassem <me@mbassem.com> | 2024-10-27 12:03:14 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2024-10-27 12:03:14 +0000 |
| commit | eb7da996a7c2d617d276f296cac07a6fd5648664 (patch) | |
| tree | 4711de55b6f5fed3ac0cf3539099a9c0f115647e /apps/web/components/dashboard/sidebar/SidebarItem.tsx | |
| parent | 801ba36af5900c84af5a88dea37aa7d2f793fed9 (diff) | |
| download | karakeep-eb7da996a7c2d617d276f296cac07a6fd5648664.tar.zst | |
ui: Redesign the settings page and move it to its own layout
Diffstat (limited to 'apps/web/components/dashboard/sidebar/SidebarItem.tsx')
| -rw-r--r-- | apps/web/components/dashboard/sidebar/SidebarItem.tsx | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/apps/web/components/dashboard/sidebar/SidebarItem.tsx b/apps/web/components/dashboard/sidebar/SidebarItem.tsx deleted file mode 100644 index 83ce776e..00000000 --- a/apps/web/components/dashboard/sidebar/SidebarItem.tsx +++ /dev/null @@ -1,55 +0,0 @@ -"use client"; - -import React from "react"; -import Link from "next/link"; -import { usePathname } from "next/navigation"; -import { cn } from "@/lib/utils"; - -export default function SidebarItem({ - name, - logo, - path, - className, - linkClassName, - style, - collapseButton, - right = null, -}: { - name: string; - logo: React.ReactNode; - path: string; - style?: React.CSSProperties; - className?: string; - linkClassName?: string; - right?: React.ReactNode; - collapseButton?: React.ReactNode; -}) { - const currentPath = usePathname(); - return ( - <li - className={cn( - "relative rounded-lg hover:bg-accent", - path == currentPath ? "bg-accent/50" : "", - className, - )} - style={style} - > - {collapseButton} - <Link - href={path} - className={cn( - "flex w-full items-center rounded-[inherit] px-3 py-2", - linkClassName, - )} - > - <div className="flex w-full justify-between"> - <div className="flex items-center gap-x-2"> - {logo} - <span>{name}</span> - </div> - {right} - </div> - </Link> - </li> - ); -} |
