diff --git a/src/app/components/Sidebar/index.tsx b/src/app/components/Sidebar/index.tsx index 40a8510..87ee3c1 100644 --- a/src/app/components/Sidebar/index.tsx +++ b/src/app/components/Sidebar/index.tsx @@ -141,6 +141,7 @@ export const Sidebar = ({ href={item.href} title={item.title} icon={item.icon} + setOpen={setOpen} /> ))} diff --git a/src/app/components/Sidebar/item.tsx b/src/app/components/Sidebar/item.tsx index 295a396..2856c8c 100644 --- a/src/app/components/Sidebar/item.tsx +++ b/src/app/components/Sidebar/item.tsx @@ -6,16 +6,21 @@ export const SidebarItem = ({ title, icon, href, + setOpen, }: { title: string; icon: React.ReactNode; href: string; + setOpen: (open: boolean) => void; }) => { const router = useRouter(); return ( router.push(href)} + onPress={() => { + router.push(href); + setOpen(false); + }} color="foreground" className="w-full p-2 gap-3 text-md" >