Skip to content

Commit

Permalink
changed useMediaQuery to useBreakpointValue
Browse files Browse the repository at this point in the history
  • Loading branch information
gerouvi committed Nov 19, 2024
1 parent e8bf34e commit 01aba0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
IconButton,
List,
ListItem,
useBreakpointValue,
useDisclosure,
useMediaQuery,
} from '@chakra-ui/react'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
Expand Down Expand Up @@ -67,7 +67,7 @@ const NavbarMenu = ({ isOpen, onClose }: { isOpen: boolean; onClose: () => void
const NavbarMenuContent = () => {
const { t } = useTranslation()
const [openSection, setOpenSection] = useState<string | null>(null)
const [isLargerThanXL] = useMediaQuery('(min-width: 1279px)')
const isLargerThanXL = useBreakpointValue({ base: false, xl: true })

const handleToggle = (label: string) => {
setOpenSection((prev) => (prev === label ? null : label))
Expand Down

0 comments on commit 01aba0a

Please sign in to comment.