Skip to content

Commit

Permalink
useDisclosure
Browse files Browse the repository at this point in the history
  • Loading branch information
gerouvi committed Nov 13, 2024
1 parent 31f03f9 commit 58df54b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Dashboard/Menu/Options.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -20,7 +20,7 @@ export const DashboardMenuOptions = () => {
const { t } = useTranslation()
const location = useLocation()
const [openSection, setOpenSection] = useState<string | null>(null)
const [modal, setModal] = useState(false)
const { isOpen, onOpen, onClose } = useDisclosure()

const menuItems: MenuItem[] = [
// {
Expand Down Expand Up @@ -84,8 +84,8 @@ export const DashboardMenuOptions = () => {

return (
<Box>
<PricingModal isOpenModal={modal} onCloseModal={() => setModal(false)} />
<Button onClick={() => setModal(true)}>Open Modal</Button>
<PricingModal isOpenModal={isOpen} onCloseModal={onClose} />
<Button onClick={onOpen}>Open Modal</Button>
<OrganizationName color='text.secondary' mb={2.5} />
{menuItems.map((item, index) => (
<Box key={index}>
Expand Down

0 comments on commit 58df54b

Please sign in to comment.