From 6621babd5e543c06dbcbf7714a563fb10ad3d7ed Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 09:40:55 +0900 Subject: [PATCH] minor fixes --- .../CompetitionSession/components/TaskContent/index.tsx | 6 +++++- .../modules/TaskSolution/components/ActionButtons/index.tsx | 2 +- .../pages/CompetitionSession/modules/TaskSolution/index.tsx | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx index 7909578..bd68954 100644 --- a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx @@ -74,7 +74,11 @@ const TaskContent: React.FC = ({ 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 'Файл'; } diff --git a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/ActionButtons/index.tsx b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/ActionButtons/index.tsx index 03eda32..eb0d280 100644 --- a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/ActionButtons/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/components/ActionButtons/index.tsx @@ -35,7 +35,7 @@ const ActionButtons: React.FC = ({ > Задача сдана! - ) : hasSubmissionsLeft ? ( + ) : hasSubmissionsLeft? (