Upload folder using huggingface_hub
Browse files
client/src/pages/TutorialTasks.tsx
CHANGED
|
@@ -989,12 +989,28 @@ const TutorialTasks: React.FC = () => {
|
|
| 989 |
requestAnimationFrame(() => setSpacerHeights(prev => ({ ...prev, [taskId]: 0 })));
|
| 990 |
});
|
| 991 |
} else {
|
| 992 |
-
// Safari: delay refetch
|
|
|
|
| 993 |
setTimeout(() => {
|
| 994 |
api.get(`/api/submissions/by-source/${taskId}`).then(r => {
|
| 995 |
const list = (r.data && r.data.submissions) || [];
|
| 996 |
setUserSubmissions(prev => ({ ...prev, [taskId]: list }));
|
| 997 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 998 |
}, 300);
|
| 999 |
}
|
| 1000 |
});
|
|
|
|
| 989 |
requestAnimationFrame(() => setSpacerHeights(prev => ({ ...prev, [taskId]: 0 })));
|
| 990 |
});
|
| 991 |
} else {
|
| 992 |
+
// Safari: delay refetch and keep locks until refetch completes
|
| 993 |
+
pendingUnlocksRef.current.add(taskId);
|
| 994 |
setTimeout(() => {
|
| 995 |
api.get(`/api/submissions/by-source/${taskId}`).then(r => {
|
| 996 |
const list = (r.data && r.data.submissions) || [];
|
| 997 |
setUserSubmissions(prev => ({ ...prev, [taskId]: list }));
|
| 998 |
+
requestAnimationFrame(() => {
|
| 999 |
+
unlockListHeight();
|
| 1000 |
+
unlockCardHeightById(taskId);
|
| 1001 |
+
unlockGridHeightById(taskId);
|
| 1002 |
+
unlockContainerHeightById(taskId);
|
| 1003 |
+
pendingUnlocksRef.current.delete(taskId);
|
| 1004 |
+
});
|
| 1005 |
+
}).catch(() => {
|
| 1006 |
+
requestAnimationFrame(() => {
|
| 1007 |
+
unlockListHeight();
|
| 1008 |
+
unlockCardHeightById(taskId);
|
| 1009 |
+
unlockGridHeightById(taskId);
|
| 1010 |
+
unlockContainerHeightById(taskId);
|
| 1011 |
+
pendingUnlocksRef.current.delete(taskId);
|
| 1012 |
+
});
|
| 1013 |
+
});
|
| 1014 |
}, 300);
|
| 1015 |
}
|
| 1016 |
});
|