From 2414b32b37e056d6f2c986b6c4c44db753babf0c Mon Sep 17 00:00:00 2001 From: void2610 Date: Mon, 23 Oct 2023 20:49:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PageTransitionButton.tsx | 45 ++++++++++++++----------- 1 file changed, 26 insertions(+), 19 deletions(-) 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}
);