diff --git a/frontend/src/components/brackets/brackets.tsx b/frontend/src/components/brackets/brackets.tsx index af03a466..ea3b9b92 100644 --- a/frontend/src/components/brackets/brackets.tsx +++ b/frontend/src/components/brackets/brackets.tsx @@ -155,16 +155,18 @@ export default function Brackets({ const stages_map = Object.fromEntries( swrStagesResponse.data.data.map((x: StageWithStageItems) => [x.id, x]) ); - const rounds = stages_map[selectedStageId].stage_items.map((stageItem: StageItemWithRounds) => - getRoundsGridCols( - stageItem, - tournamentData, - swrStagesResponse, - swrCourtsResponse, - swrUpcomingMatchesResponse, - readOnly - ) - ); + const rounds = stages_map[selectedStageId].stage_items + .sort((i1: StageItemWithRounds, i2: StageItemWithRounds) => (i1.name > i2.name ? 1 : 0)) + .map((stageItem: StageItemWithRounds) => + getRoundsGridCols( + stageItem, + tournamentData, + swrStagesResponse, + swrCourtsResponse, + swrUpcomingMatchesResponse, + readOnly + ) + ); return (