diff --git a/services/frontend/src/pages/CompetitionSession/components/CompetitionHeader/index.tsx b/services/frontend/src/pages/CompetitionSession/components/CompetitionHeader/index.tsx index 96e36ef..405d5c0 100644 --- a/services/frontend/src/pages/CompetitionSession/components/CompetitionHeader/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/components/CompetitionHeader/index.tsx @@ -1,7 +1,6 @@ import React from 'react'; import { Link } from 'react-router-dom'; import { Task } from '@/shared/types/task'; -import { getTaskBgColor, getTaskTextColor } from '../../utils/utils'; interface CompetitionHeaderProps { title: string; diff --git a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx index 44ebfd0..d4b9c2c 100644 --- a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx @@ -20,7 +20,7 @@ interface TaskSolutionProps { const TaskSolution: React.FC = ({ task, - solutions, + solutions = [], answer, setAnswer, onSubmit, @@ -42,9 +42,17 @@ const TaskSolution: React.FC = ({ setIsHistoryOpen(true); }; + const latestSolution = solutions && solutions.length > 0 ? solutions[0] : null; + return (
- + {latestSolution ? ( + + ) : ( +
+ Решение еще не отправлено +
+ )} {task.type === TaskType.INPUT && (