feat: prevent click same

This commit is contained in:
GyDi committed 2021-12-31 18:21:35 +08:00
1 parent cba176cdc9
commit 3c908963ae
1 file changed
+1
+1
View File
@@ -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)