From f574204c19a7d2ecd32d5a6acb68c610004300da Mon Sep 17 00:00:00 2001 From: brian <90752841+wokbjso@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:58:09 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20swipe=20=ED=9B=85=20=EC=95=88=EC=9D=98?= =?UTF-8?q?=20=ED=95=A8=EC=88=98=20const=ED=98=95=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hooks/use-swipe.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hooks/use-swipe.tsx b/hooks/use-swipe.tsx index 70eb3bff..43c67b9b 100644 --- a/hooks/use-swipe.tsx +++ b/hooks/use-swipe.tsx @@ -15,11 +15,11 @@ export function useSwipe({ }: UseSwipeProps) { const [touchStartX, setTouchStartX] = useState(null); - function handleTouchStart(e: React.TouchEvent) { + const handleTouchStart = (e: React.TouchEvent) => { setTouchStartX(e.touches[0].clientX); - } + }; - function handleTouchEnd(e: React.TouchEvent) { + const handleTouchEnd = (e: React.TouchEvent) => { if (touchStartX === null) return; const touchEndX = e.changedTouches[0].clientX; @@ -34,7 +34,7 @@ export function useSwipe({ } setTouchStartX(null); - } + }; return { handleTouchStart,