Browse Source

feat: prevent click same

GyDi 3 years ago
parent
commit
6b3e7cbc08
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/pages/profile.tsx

+ 1 - 0
src/pages/profile.tsx

@@ -77,6 +77,7 @@ const ProfilePage = () => {
 
 
   const lockRef = useRef(false);
   const lockRef = useRef(false);
   const onProfileChange = (index: number) => {
   const onProfileChange = (index: number) => {
+    if (index === profiles.current || lockRef.current) return;
     if (lockRef.current) return;
     if (lockRef.current) return;
     lockRef.current = true;
     lockRef.current = true;
     putProfiles(index)
     putProfiles(index)