diff --git a/src/components/modules/Navbar/Navbar.tsx b/src/components/modules/Navbar/Navbar.tsx index 412c3ad..b664e66 100644 --- a/src/components/modules/Navbar/Navbar.tsx +++ b/src/components/modules/Navbar/Navbar.tsx @@ -1,5 +1,33 @@ +import { Gamepad2 } from 'lucide-react'; +import { useEffect, useState } from 'react'; const Navbar = () => { - return
; + const [backgroundNavbar, setBackgroundNavbar] = useState('bg-transparent'); + useEffect(() => { + const handleScroll = () => { + if (window.scrollY >= 100) { + setBackgroundNavbar('bg-black/30'); + } else { + setBackgroundNavbar('bg-transparent'); + } + }; + + window.addEventListener('scroll', handleScroll); + + return () => { + window.removeEventListener('scroll', handleScroll); + }; + }, []); + + return ( +
+
+ + F +
+
+ ); }; export default Navbar;