diff --git a/src/components/PageTransitionButton.tsx b/src/components/PageTransitionButton.tsx index c6b94e0..623899b 100644 --- a/src/components/PageTransitionButton.tsx +++ b/src/components/PageTransitionButton.tsx @@ -1,5 +1,6 @@ import { useRouter } from "next/router"; import { motion } from "framer-motion"; +import { useState } from "react"; export const PageTransitionButton = ({ buttonText, @@ -9,38 +10,44 @@ export const PageTransitionButton = ({ nextPage: string; }) => { const router = useRouter(); + const [isClicked, setIsClicked] = useState(false); const handleClick = () => { + setIsClicked(true); router.push("/contents/" + nextPage, undefined, { scroll: false }); - return; }; return (
-

- {buttonText} -

+ {buttonText}
);