Skip to content

Commit

Permalink
ui: Provide deterministic order to task list (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
inahga committed Apr 10, 2024
1 parent af05788 commit b3bef74
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/src/tasks/TaskList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ function TaskList() {
} else {
return (
<ListGroup>
{tasks.map((task) => (
<LinkContainer key={task.id} to={task.id}>
<ListGroup.Item action>
<VdafIcon task={task} />
{task.name}
</ListGroup.Item>
</LinkContainer>
))}
{tasks
.sort((a, b) => a.name.localeCompare(b.name))
.map((task) => (
<LinkContainer key={task.id} to={task.id}>
<ListGroup.Item action>
<VdafIcon task={task} />
{task.name}
</ListGroup.Item>
</LinkContainer>
))}
</ListGroup>
);
}
Expand Down

0 comments on commit b3bef74

Please sign in to comment.