From 95494ed22982a1b3a203f05c08471d2b60ece7d2 Mon Sep 17 00:00:00 2001 From: Elias da Rosa Date: Sat, 25 Nov 2023 15:36:17 -0300 Subject: [PATCH] fix: add toggleSidebar onClick menu --- src/components/layout/SidebarMenuItem.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/layout/SidebarMenuItem.tsx b/src/components/layout/SidebarMenuItem.tsx index 7d4b8a9..d97d9de 100644 --- a/src/components/layout/SidebarMenuItem.tsx +++ b/src/components/layout/SidebarMenuItem.tsx @@ -1,3 +1,4 @@ +import { useSidebar } from '@/hooks/useSidebar' import { Icon } from '@phosphor-icons/react' import Link from 'next/link' @@ -8,10 +9,13 @@ interface MenuItemProps { } export function SidebarMenuItem({ label, icon: Icon, href }: MenuItemProps) { + const { toggleSidebar } = useSidebar() + return (