diff --git a/src/components/on-this-page.tsx b/src/components/on-this-page.tsx index b503e46..6038087 100644 --- a/src/components/on-this-page.tsx +++ b/src/components/on-this-page.tsx @@ -10,7 +10,7 @@ import { cn } from "@/lib/utils"; import { truncateText } from "@/lib/string"; import { motion, useInView } from "framer-motion"; import { Separator } from "@/components/ui/separator"; -import Image from "next/image"; +import { Button } from "@/components/ui/button"; type Header = { id: string; @@ -137,25 +137,50 @@ const OnThisPage = ({ page }: { page: DocsContentMetadata }): ReactElement => { ); }; -const Footer = ({ page }: { page: DocsContentMetadata }): ReactElement => ( - -); +const Footer = ({ page }: { page: DocsContentMetadata }): ReactElement => { + const [hasScrolled, setHasScrolled] = useState(false); + + useEffect(() => { + const handleScroll = () => setHasScrolled(window.scrollY > 400); + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); + }, []); + + return ( + + ); +}; export default OnThisPage;