diff --git a/src/components/Navigation.jsx b/src/components/Navigation.jsx index 34326f2..e5e902c 100644 --- a/src/components/Navigation.jsx +++ b/src/components/Navigation.jsx @@ -1,8 +1,18 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { Link, useLocation } from 'react-router-dom'; const Navigation = () => { const location = useLocation(); + const [isScrolled, setIsScrolled] = useState(false); + + useEffect(() => { + const handleScroll = () => { + setIsScrolled(window.scrollY > 0); + }; + + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, []); const navItems = [ { path: '/', label: 'HOME' }, @@ -13,10 +23,10 @@ const Navigation = () => { ]; return ( -