diff --git a/frontend/src/LandingPage.jsx b/frontend/src/LandingPage.jsx index 74d842f..5888739 100644 --- a/frontend/src/LandingPage.jsx +++ b/frontend/src/LandingPage.jsx @@ -1,11 +1,13 @@ import ProfileInfoCard from "./components/Cards/ProfileinfoCard"; -import React, { useContext, useState } from "react"; +import React, { useContext, useState, useEffect } from "react"; import { APP_FEATURES, STATS, HOW_IT_WORKS_STEPS } from "./utils/data"; import { useNavigate } from "react-router-dom"; + import { LuSparkles, LuChevronRight, LuArrowRight, + LuArrowUp, LuUsers, } from "react-icons/lu"; import { VscGitMerge } from "react-icons/vsc"; @@ -127,6 +129,7 @@ const LandingPage = () => { const [currentPage, setCurrentPage] = useState("login"); const [pendingRoute, setPendingRoute] = useState(null); const [activeStep, setActiveStep] = useState(1); + const [showScrollTop, setShowScrollTop] = useState(false); const handleCTA = () => { if (!user) { @@ -152,6 +155,24 @@ const LandingPage = () => { navigate(route); } }; + useEffect(() => { + const handleScroll = () => { + setShowScrollTop(window.scrollY > 300); + }; + + window.addEventListener("scroll", handleScroll); + + return () => { + window.removeEventListener("scroll", handleScroll); + }; + }, []); + + const scrollToTop = () => { + window.scrollTo({ + top: 0, + behavior: "smooth", + }); + }; return ( <> @@ -835,7 +856,69 @@ const LandingPage = () => {

© {new Date().getFullYear()} PrepPilot AI. All rights reserved.

- + {/* Premium Back To Top Button */} + + {showScrollTop && ( + + {/* Glow */} +
+ + {/* Button */} +
+ +
+ + )} + {/* ───────────────────────────────── AUTH MODAL ───────────────────────────────── */}