From 58df54b6b4b2706ece259a0d1cba5ef12c82df11 Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 13 Nov 2024 12:25:17 +0100 Subject: [PATCH] useDisclosure --- src/components/Dashboard/Menu/Options.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Dashboard/Menu/Options.tsx b/src/components/Dashboard/Menu/Options.tsx index bba3686b..f6ef7380 100644 --- a/src/components/Dashboard/Menu/Options.tsx +++ b/src/components/Dashboard/Menu/Options.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Collapse } from '@chakra-ui/react' +import { Box, Button, Collapse, useDisclosure } from '@chakra-ui/react' import { OrganizationName } from '@vocdoni/chakra-components' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -20,7 +20,7 @@ export const DashboardMenuOptions = () => { const { t } = useTranslation() const location = useLocation() const [openSection, setOpenSection] = useState(null) - const [modal, setModal] = useState(false) + const { isOpen, onOpen, onClose } = useDisclosure() const menuItems: MenuItem[] = [ // { @@ -84,8 +84,8 @@ export const DashboardMenuOptions = () => { return ( - setModal(false)} /> - + + {menuItems.map((item, index) => (