diff --git a/frontend/src/components/homePage/HomePage.jsx b/frontend/src/components/homePage/HomePage.jsx index 5daaaab..9a6be7a 100644 --- a/frontend/src/components/homePage/HomePage.jsx +++ b/frontend/src/components/homePage/HomePage.jsx @@ -16,14 +16,6 @@ export const Header = () => { const navigate = useNavigate(); const { loadingUser, userDetails } = useUser(); - if (loadingUser) { - return ( -
- -
- ); - } - useEffect(() => { gsap.to(".first-page-image", { y: -100, @@ -57,7 +49,15 @@ export const Header = () => { } ); }); - }, []); + }, [loadingUser]); + + if (loadingUser) { + return ( +
+ +
+ ); + } return (