diff --git a/services/frontend/src/pages/Competition/index.tsx b/services/frontend/src/pages/Competition/index.tsx index 3381ad7..a7822a9 100644 --- a/services/frontend/src/pages/Competition/index.tsx +++ b/services/frontend/src/pages/Competition/index.tsx @@ -59,14 +59,14 @@ const CompetitionPage = () => { }; const handleViewResults = () => { - navigate(`/competition/${competitionId}/results`); + console.log("sorryan") }; // Check if competition has ended const isCompetitionEnded = () => { - if (!competitionQuery.data?.end_date) return false; + if (!competition?.end_date) return false; - const endDate = new Date(competitionQuery.data.end_date); + const endDate = new Date(competition.end_date); const now = new Date(); return now > endDate; diff --git a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx index 0c49ca3..5bfc7ea 100644 --- a/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/components/TaskContent/index.tsx @@ -27,7 +27,7 @@ const TaskContent: React.FC = ({ task }) => { return (

- Задача {task.in_competition_position} + {task.title}

diff --git a/services/frontend/src/pages/CompetitionSession/index.tsx b/services/frontend/src/pages/CompetitionSession/index.tsx index 4297e8e..fd8ec50 100644 --- a/services/frontend/src/pages/CompetitionSession/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/index.tsx @@ -8,7 +8,6 @@ import { getCompetition } from "@/shared/api/competitions"; import { Loader2 } from "lucide-react"; import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { TaskType } from "@/shared/types/task"; -import { CompetitionType } from "@/shared/types/task"; const CompetitionSession = () => { const { id, taskId } = useParams<{ id: string; taskId?: string }>(); diff --git a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx index fd2574d..67c9171 100644 --- a/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx +++ b/services/frontend/src/pages/CompetitionSession/modules/TaskSolution/index.tsx @@ -54,7 +54,7 @@ const TaskSolution: React.FC = ({ const latestSolution = solutionHistory[solutionHistory.length - 1]; setDisplayedSolution(latestSolution); } - }, [solutionHistory, displayedSolution]); + }, [solutionHistory]); useEffect(() => { if (prevTaskIdRef.current !== task.id) {