Skip to content

Commit 99d89c9

Browse files
authored
Merge pull request #4481 from simranb86/issue_4384
fix for Issue #4384
2 parents 1f0fbb7 + 5811f08 commit 99d89c9

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/shared/components/challenge-listing/Listing/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function Listing({
4545
expandTag,
4646
pastSearchTimestamp,
4747
}) {
48-
const buckets = getBuckets(_.get(auth.user, 'handle'));
48+
const buckets = getBuckets(_.get(auth.user, 'userId'));
4949
const isChallengesAvailable = (bucket) => {
5050
const filter = Filter.getFilterFunction(buckets[bucket].filter);
5151
const clonedChallenges = _.clone(challenges);

src/shared/containers/challenge-listing/Sidebar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class SidebarContainer extends React.Component {
6262
user,
6363
} = this.props;
6464

65-
const buckets = getBuckets(user && user.handle);
65+
const buckets = getBuckets(user && user.userId);
6666

6767
if (extraBucket) {
6868
buckets[extraBucket.name] = extraBucket;

src/shared/utils/challenge-listing/buckets.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,12 @@ export const NO_LIVE_CHALLENGES_CONFIG = {
132132

133133
/**
134134
* Returns configuration of all possible challenge buckets.
135-
* @param {String} userHandle Handle of the authenticated
135+
* @param {String} userId id of the authenticated
136136
* user to filter out My Challenges.
137137
*/
138-
export function getBuckets(userHandle) {
138+
export function getBuckets(userId) {
139139
const res = _.cloneDeep(BUCKET_DATA);
140-
// TODO: Find equivalent of users
141-
res[BUCKETS.MY].filter.users = [userHandle];
140+
res[BUCKETS.MY].filter.users = [userId];
142141
return res;
143142
}
144143

0 commit comments

Comments
 (0)