Skip to content

Commit

Permalink
Merge pull request #112 from virtualidentityag/develop
Browse files Browse the repository at this point in the history
feat: sort topics in registration by long title
  • Loading branch information
janrembold authored Jun 25, 2024
2 parents f37f78b + fb3086d commit 2b8c8cc
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,11 @@ export const TopicSelection: VFC<{
{topicGroup.topicIds
.map((t) => getTopic(t))
.filter(Boolean)
.sort((a, b) => {
if (a.name === b.name)
return 0;
return a.name < b.name
? -1
: 1;
})
.sort((a, b) =>
a.titles.long.localeCompare(
b.titles.long
)
)
.map((topic, index) => (
<TopicSelect
key={`${topicGroup.id}-${topic.id}`}
Expand Down

0 comments on commit 2b8c8cc

Please sign in to comment.