diff --git a/components/about/ToApp.tsx b/components/about/ToApp.tsx index ac8badb..9373f63 100644 --- a/components/about/ToApp.tsx +++ b/components/about/ToApp.tsx @@ -1,21 +1,44 @@ +import { useState, useEffect } from "react"; + export default function ToApp() { + const [showButton, setShowButton] = useState(true); + + useEffect(() => { + const handleScroll = () => { + if (window.scrollY < 2) { + setShowButton(true); + } else { + setShowButton(false); + } + }; + + window.addEventListener("scroll", handleScroll); + return () => window.removeEventListener("scroll", handleScroll); + }, []); + return ( <> - {/* */} - + + {showButton && ( +
+ Try it! + +
+ )} + + ); }; diff --git a/pages/about.tsx b/pages/about.tsx index b6a3310..dc04be2 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -32,7 +32,7 @@ export default function Home() {

(noun): riff + diffusion

-
+