menu-animation

This commit is contained in:
tangly1024.com
2023-03-23 13:16:28 +08:00
parent 7861c6d6a9
commit 1487725be5
17 changed files with 189 additions and 76 deletions

View File

@@ -1,5 +1,5 @@
import LogoBar from './LogoBar'
import React, { useRef } from 'react'
import { useRef, useState } from 'react'
import Collapse from '@/components/Collapse'
import { MenuBarMobile } from './MenuBarMobile'
import { useGlobal } from '@/lib/global'
@@ -14,7 +14,7 @@ import { MenuItemDrop } from './MenuItemDrop'
*/
export default function TopNavBar(props) {
const { className, customNav, customMenu } = props
const [isOpen, changeShow] = React.useState(false)
const [isOpen, changeShow] = useState(false)
const collapseRef = useRef(null)
const { locale } = useGlobal()