From 764edccfc7f5ce4c284eee320c7586cbb7addc99 Mon Sep 17 00:00:00 2001 From: tanish35 Date: Mon, 14 Oct 2024 15:17:39 +0530 Subject: [PATCH] Minor fix --- frontend/src/components/homePage/HomePage.jsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 (