소스 검색

feat: prevent click same

GyDi 3 년 전
부모
커밋
6b3e7cbc08
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/pages/profile.tsx

+ 1 - 0
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)