From 6b3e7cbc08a771dbfad84de3158edfa5c31f8ec8 Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
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 efc14af..11f1544 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)
-- 
GitLab