From 3c908963aea32989dd22f6469908830ba8db1861 Mon Sep 17 00:00:00 2001 From: GyDi Date: Fri, 31 Dec 2021 18:21:35 +0800 Subject: [PATCH] feat: prevent click same --- src/pages/profile.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/profile.tsx b/src/pages/profile.tsx index efc14af7..11f15446 100644 --- a/src/pages/profile.tsx +++ b/src/pages/profile.tsx @@ -77,6 +77,7 @@ const ProfilePage = () => { const lockRef = useRef(false); const onProfileChange = (index: number) => { + if (index === profiles.current || lockRef.current) return; if (lockRef.current) return; lockRef.current = true; putProfiles(index)