diff --git a/src/components/Header-section/Header-section.css b/src/components/Header-section/Header-section.css index 333b886a..122f88fb 100644 --- a/src/components/Header-section/Header-section.css +++ b/src/components/Header-section/Header-section.css @@ -129,4 +129,4 @@ height: 44px; background: #1abc9c; } -} \ No newline at end of file +} diff --git a/src/components/Header-section/Navbar.jsx b/src/components/Header-section/Navbar.jsx index 488d3da7..fee82683 100644 --- a/src/components/Header-section/Navbar.jsx +++ b/src/components/Header-section/Navbar.jsx @@ -1,31 +1,171 @@ import { FiUser } from "react-icons/fi"; +import { FiX } from "react-icons/fi"; import { Link } from "react-router-dom"; -import MenuIcon from "../../assets/Icons/menu-icon.png"; import logo from "../../assets/Images/logo.png"; +import { useState, useEffect } from "react"; + const Navbar = () => { + const [showMenu, setShowMenu] = useState(""); + const [doBlure, setDoBlure] = useState(false); + + useEffect(() => { + const scrollHandler = () => { + setDoBlure(window.pageYOffset <= 30); + }; + window.addEventListener("scroll", scrollHandler); + + scrollHandler(); + + return () => { + window.removeEventListener("scroll", scrollHandler); + }; + }, []); + return ( <> -