Skip to content

Commit

Permalink
Add support modal open feature into Contacto button of mobile menu
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMejia77 committed Sep 25, 2024
1 parent e219b13 commit ba4b526
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/(nav-bar)/mobile-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from 'next/image'
import { useEffect, type ReactNode, useState, useRef, LegacyRef } from 'react'

import { useSupportDialogStore } from '@/store/useSupportDialog'
import { ToggleTheme } from '@/components/theme-mode'
import { useRouter } from 'next/navigation'
import { Button } from '@/components/button'
Expand All @@ -20,6 +20,7 @@ export function MobileMenu({ buttonValue, open, handleOPen, routes }: Props) {
const [curIndex, setCurIndex] = useState(0)
const handleCurIndex = (index: number) => setCurIndex(index ? index : 0)
const route = useRouter()
const { onOpen } = useSupportDialogStore()
const navRef: LegacyRef<HTMLDivElement> = useRef(null)
const bgRef: LegacyRef<HTMLDivElement> = useRef(null)

Expand Down Expand Up @@ -106,7 +107,7 @@ export function MobileMenu({ buttonValue, open, handleOPen, routes }: Props) {
))}

<li>
<Button className="w-full text-start">Contacto</Button>
<Button className="w-full text-start" onClick={onOpen}>Contacto</Button>
</li>
</ul>
<div>
Expand Down

0 comments on commit ba4b526

Please sign in to comment.