diff --git a/src/components/backdrop/backdrop.tsx b/src/components/backdrop/backdrop.tsx index 2acfd15..682ca13 100644 --- a/src/components/backdrop/backdrop.tsx +++ b/src/components/backdrop/backdrop.tsx @@ -12,7 +12,7 @@ const Backdrop: React.FC = ({ movie, backdrop }) => { const [isLoading, setIsLoading] = useState(true); return ( -
+

diff --git a/src/components/header/header.tsx b/src/components/header/header.tsx index 9f44d17..9317ae4 100644 --- a/src/components/header/header.tsx +++ b/src/components/header/header.tsx @@ -1,9 +1,30 @@ +'use client'; + import Link from 'next/link'; -import React from 'react'; +import React, { useEffect, useState } from 'react'; const Header: React.FC = () => { + const [isScrolled, setIsScrolled] = useState(false); + + useEffect(() => { + const handleScroll = () => { + if (window.scrollY > 0) { + setIsScrolled(true); + } else { + setIsScrolled(false); + } + }; + + window.addEventListener('scroll', handleScroll); + return () => window.removeEventListener('scroll', handleScroll); + }, []); + return ( -

+
Movies Catalog diff --git a/src/modules/detailMovie/detailMovie.tsx b/src/modules/detailMovie/detailMovie.tsx index 827c4b8..b8c09fd 100644 --- a/src/modules/detailMovie/detailMovie.tsx +++ b/src/modules/detailMovie/detailMovie.tsx @@ -35,10 +35,10 @@ const DetailMovieModule: React.FC = ({ id }) => { return (
-
+