mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 22:07:10 +00:00
minor fixes
This commit is contained in:
@@ -74,7 +74,11 @@ const TaskContent: React.FC<TaskContentProps> = ({ task }) => {
|
||||
const getFileNameFromUrl = (url: string): string => {
|
||||
try {
|
||||
const parts = url.split('/');
|
||||
return parts[parts.length - 1];
|
||||
const fullFileName = parts[parts.length - 1]
|
||||
const fileName = fullFileName.length > 20
|
||||
? fullFileName.substring(0, 20) + '...'
|
||||
: fullFileName;
|
||||
return fileName;
|
||||
} catch (e) {
|
||||
return 'Файл';
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
|
||||
>
|
||||
Задача сдана!
|
||||
</Button>
|
||||
) : hasSubmissionsLeft ? (
|
||||
) : hasSubmissionsLeft? (
|
||||
<Button
|
||||
onClick={onSubmit}
|
||||
className="font-hse-sans flex-grow"
|
||||
|
||||
@@ -51,7 +51,7 @@ const TaskSolution: React.FC<TaskSolutionProps> = ({
|
||||
const maxAttempts = task.max_attempts || -1;
|
||||
const submissionsUsed = solutionHistory.length;
|
||||
const submissionsLeft = Math.max(0, maxAttempts - submissionsUsed);
|
||||
const hasSubmissionsLeft = submissionsLeft > 0;
|
||||
const hasSubmissionsLeft = submissionsLeft > 0 || maxAttempts === -1;
|
||||
|
||||
useEffect(() => {
|
||||
if (solutionHistory.length > 0 && !displayedSolution) {
|
||||
|
||||
Reference in New Issue
Block a user