From acfdd777f12ae5fd59fcfd5f2a63e5126afcba6b Mon Sep 17 00:00:00 2001 From: rngsurrounded Date: Tue, 4 Mar 2025 06:05:51 +0900 Subject: [PATCH] final fix --- services/frontend/src/pages/Competition/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/frontend/src/pages/Competition/index.tsx b/services/frontend/src/pages/Competition/index.tsx index 4cf4911..a86ef80 100644 --- a/services/frontend/src/pages/Competition/index.tsx +++ b/services/frontend/src/pages/Competition/index.tsx @@ -38,7 +38,10 @@ const CompetitionPage = () => { const tasks = await getCompetitionTasks(competitionId); if (tasks && tasks.length > 0) { - navigate(`/competition/${competitionId}/tasks/${tasks[0].id}`); + const sortedTasks = [...tasks].sort((a, b) => { + return a.in_competition_position - b.in_competition_position; + }); + navigate(`/competition/${competitionId}/tasks/${sortedTasks[0].id}`); } else { navigate(`/competition/${competitionId}/tasks`); }