diff --git a/frontend/components/navigation/sidebar/sidebar-item-with-icon.tsx b/frontend/components/navigation/sidebar/sidebar-item-with-icon.tsx index ab7d614c..114c95fb 100644 --- a/frontend/components/navigation/sidebar/sidebar-item-with-icon.tsx +++ b/frontend/components/navigation/sidebar/sidebar-item-with-icon.tsx @@ -1,13 +1,19 @@ import { LucideIcon } from "lucide-react"; +import { useRouter } from "next/navigation"; interface SidebarItemWithIconProps { Icon: LucideIcon; label: string; + categoryId: number; } -const SidebarItemWithIcon = ({ Icon, label }: SidebarItemWithIconProps) => { +const SidebarItemWithIcon = ({ Icon, label, categoryId }: SidebarItemWithIconProps) => { + const router = useRouter(); + + const onClickCategory = () => router.push(`/categories/${categoryId}`); + return ( -