Skip to content

Commit baa0293

Browse files
Hotfix ChallengeTags
1 parent 5e787fa commit baa0293

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/shared/components/challenge-detail/Header/ChallengeTags.jsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import React from 'react';
1010
import PT from 'prop-types';
11-
import _ from 'lodash';
1211

1312
import {
1413
Tag,
@@ -60,15 +59,15 @@ export default function ChallengeTags(props) {
6059
return (
6160
<div>
6261
{
63-
type
62+
challengeType
6463
&& (
65-
<TrackTag
66-
onClick={() => setImmediate(() => setChallengeListingFilter(challengeType.id))
67-
}
68-
to={`${challengesUrl}?filter[types][0]=${encodeURIComponent(challengeType.id)}`}
69-
>
70-
{challengeType.name}
71-
</TrackTag>
64+
<TrackTag
65+
onClick={() => setImmediate(() => setChallengeListingFilter(challengeType.id))
66+
}
67+
to={`${challengesUrl}?filter[types][0]=${encodeURIComponent(challengeType.id)}`}
68+
>
69+
{challengeType.name}
70+
</TrackTag>
7271
)
7372
}
7473
{
@@ -109,9 +108,8 @@ ChallengeTags.defaultProps = {
109108
ChallengeTags.propTypes = {
110109
challengesUrl: PT.string.isRequired,
111110
track: PT.string.isRequired,
112-
type: PT.string.isRequired,
113111
events: PT.arrayOf(PT.string),
114112
technPlatforms: PT.arrayOf(PT.string),
115113
setChallengeListingFilter: PT.func.isRequired,
116-
challengeTypesMap: PT.shape().isRequired,
114+
challengeType: PT.shape().isRequired,
117115
};

0 commit comments

Comments
 (0)