11'use client'
22
3- import { Dialog , Transition } from '@headlessui/react'
3+ import { Dialog , DialogPanel , Transition , TransitionChild } from '@headlessui/react'
44import { disableBodyScroll , enableBodyScroll , clearAllBodyScrollLocks } from 'body-scroll-lock'
55import { Fragment , useState , useEffect , useRef } from 'react'
66import Link from './Link'
@@ -44,7 +44,7 @@ const MobileNav = () => {
4444 </ button >
4545 < Transition appear show = { navShow } as = { Fragment } unmount = { false } >
4646 < Dialog as = "div" onClose = { onToggleNav } unmount = { false } >
47- < Transition . Child
47+ < TransitionChild
4848 as = { Fragment }
4949 enter = "ease-out duration-300"
5050 enterFrom = "opacity-0"
@@ -55,9 +55,9 @@ const MobileNav = () => {
5555 unmount = { false }
5656 >
5757 < div className = "fixed inset-0 z-60 bg-black/25" />
58- </ Transition . Child >
58+ </ TransitionChild >
5959
60- < Transition . Child
60+ < TransitionChild
6161 as = { Fragment }
6262 enter = "transition ease-in-out duration-300 transform"
6363 enterFrom = "translate-x-full opacity-0"
@@ -67,7 +67,7 @@ const MobileNav = () => {
6767 leaveTo = "translate-x-full opacity-0"
6868 unmount = { false }
6969 >
70- < Dialog . Panel className = "fixed top-0 left-0 z-70 h-full w-full bg-white opacity- 95 duration-300 dark:bg-gray-950 dark:opacity-[0.98] " >
70+ < DialogPanel className = "fixed top-0 left-0 z-70 h-full w-full bg-white/ 95 duration-300 dark:bg-gray-950/98 " >
7171 < nav
7272 ref = { navRef }
7373 className = "mt-8 flex h-full basis-0 flex-col items-start overflow-y-auto pt-2 pl-12 text-left"
@@ -97,8 +97,8 @@ const MobileNav = () => {
9797 />
9898 </ svg >
9999 </ button >
100- </ Dialog . Panel >
101- </ Transition . Child >
100+ </ DialogPanel >
101+ </ TransitionChild >
102102 </ Dialog >
103103 </ Transition >
104104 </ >
0 commit comments