diff --git a/src/components/Header.tsx b/src/components/Header.tsx
index aed77fe..5034e3c 100644
--- a/src/components/Header.tsx
+++ b/src/components/Header.tsx
@@ -1,3 +1,4 @@
+import { useState } from "react";
import SearchBar from "./SearchBar";
import Logo from "../assets/img/logoM3.png";
import Cart from "../assets/img/Cart.png";
@@ -7,13 +8,9 @@ import HeaderLinks from "./HeaderLinks";
import MenuMobile from "./menuMobile";
const Header = () => {
- const activeMenuMobile = async () => {
- const menu = document.querySelector(".page-header__menu-mobile");
- if (menu?.classList.contains("active")) {
- menu?.classList.remove("active");
- } else {
- menu?.classList.add("active");
- }
+ const [isActive, setIsActive] = useState(false);
+ const activeMenuMobile = () => {
+ setIsActive(!isActive);
};
return (
@@ -28,16 +25,23 @@ const Header = () => {
>
-