Skip to content

Commit 6f843f5

Browse files
fix issues on sub community dropdown list
1 parent 39c44ba commit 6f843f5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

__tests__/shared/components/challenge-listing/Filters/__snapshots__/FiltersPanel.jsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ exports[`Matches shallow shapshot 1`] = `
9090
</div>,
9191
"label": "Sample community",
9292
"name": "Sample community",
93-
"value": "123",
93+
"value": "",
9494
},
9595
]
9696
}
@@ -286,7 +286,7 @@ exports[`Matches shallow shapshot 2`] = `
286286
</div>,
287287
"label": "Sample community",
288288
"name": "Sample community",
289-
"value": "123",
289+
"value": "",
290290
},
291291
]
292292
}

src/shared/actions/tc-communities/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function getListInit(uuid) {
3838
* @return {Promise}
3939
*/
4040
function getListDone(uuid, auth) {
41-
const groups = _.get(auth, 'profile.groups', []).map(g => g.oldId);
41+
const groups = _.get(auth, 'profile.groups', []).map(g => g.id);
4242
return getCommunitiesService(auth.tokenV3)
4343
.getList(groups).then(list => ({ list, uuid }));
4444
}

src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export default function FiltersPanel({
182182
const communityOps = communityFilters.filter(community => !community.hidden)
183183
.map(community => ({
184184
label: community.communityName,
185-
value: community.communityId,
185+
value: community.groupIds && community.groupIds.length > 0 ? community.groupIds[0] : '',
186186
name: community.communityName,
187187
data: getLabel(community),
188188
}));

0 commit comments

Comments
 (0)