Add menu control button

This commit is contained in:
2023-09-25 18:47:15 +08:00
parent 3d7e8722c2
commit c36629d24b
6 changed files with 147 additions and 13 deletions

View File

@@ -11,6 +11,7 @@ const Home: React.FC = () => {
const {
hideScrollbarRef,
navbarHiddenState: { navbarHidden, setNavbarHidden },
showDropdownMenuState: {setShowDropdownMenu},
preventScrollState: { setPreventScroll }
} = useContext(MainFrameworkContext)
@@ -37,6 +38,7 @@ const Home: React.FC = () => {
const handleScrollToContent = (index: number) => {
return () => {
setShowDropdownMenu(false)
if (!index) {
setNavbarHidden(true)
hideScrollbarRef.current?.scrollY(0)