Skip to content

Commit 5ba241e

Browse files
Merge pull request #120 from SingularityNET-Archive:Andre-Diamond/issue118
Alphabetical order for WGs - [Date: 2024-06-15]
2 parents 67d0dea + aed90ea commit 5ba241e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pages/submit-meeting-summary/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ const SubmitMeetingSummary: NextPage = () => {
4444
const names1 = await getNames();
4545
const tags1 = await getTags();
4646

47+
// Sort workgroups alphabetically by workgroup name
48+
const sortedWorkgroups = workgroupList.sort((a: Workgroup, b: Workgroup) =>
49+
a.workgroup.localeCompare(b.workgroup)
50+
);
51+
4752
let newNames = names1.map((value) => ({ value: value.name, label: value.name }));
4853

4954
let otherTags = tags1
@@ -66,7 +71,7 @@ const SubmitMeetingSummary: NextPage = () => {
6671
.filter(tag => tag.type === 'gamesPlayed')
6772
.map(tag => ({ value: tag.tag, label: tag.tag }));
6873

69-
setWorkgroups(workgroupList);
74+
setWorkgroups(sortedWorkgroups);
7075
setNames(newNames);
7176
setTags({ other: otherTags, emotions: emotionTags, topicsCovered: topicTags, references: referenceTags, gamesPlayed: gamesPlayedTags });
7277
setIsLoading(false);

0 commit comments

Comments
 (0)