diff --git a/components/CoursesSilder.tsx b/components/CoursesSilder.tsx index 3a3bbf2..6be1640 100644 --- a/components/CoursesSilder.tsx +++ b/components/CoursesSilder.tsx @@ -12,7 +12,7 @@ import './slick.css' const CoursesSilder = ({ courses }: { courses: CoursesProps[] }) => { - var settings = { + const settings = { dots: true, infinite: true, speed: 500, diff --git a/components/Navbar/Nav.tsx b/components/Navbar/Nav.tsx index a598fa9..212c03e 100644 --- a/components/Navbar/Nav.tsx +++ b/components/Navbar/Nav.tsx @@ -15,23 +15,9 @@ type Props = { settings: SettingsProps } const Nav = ({ openNav, courses, showNav, settings }: Props) => { - const [navBg, setNavBg] = useState(false) + const [dropdownOpen, setDropdownOpen] = useState(false); - useEffect(() => { - const handler = () => { - if (window.scrollY >= 90) { - setNavBg(true) - } else if (window.scrollY <= 90) { - setNavBg(false) - } - } - - window.addEventListener("scroll", handler) - return () => { - window.removeEventListener("scroll", handler) - } - }, []); return (