Skip to content

Commit 836e550

Browse files
fix lint
1 parent fab2854 commit 836e550

File tree

7 files changed

+16
-11
lines changed

7 files changed

+16
-11
lines changed

src/actions/auth.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
import { createActions } from "redux-actions";
7+
import _ from "lodash";
78
import { decodeToken, readCookie } from "../utils/token";
89
import { getApiV3, getApiV5 } from "../services/challenge-api";
910
import { setErrorIcon, ERROR_ICON_TYPES } from "../utils/errors";

src/actions/challenge.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,16 @@ function getChallengeDone(challengeId) {
462462
* @return {Action}
463463
*/
464464
async function getIsRegistered(challengeId, userId) {
465-
const registrants = await challengeService.getChallengeRegistrants(challengeId);
466-
const isRegistered = _.some(registrants, (r) => `${r.memberId}` === `${userId}`);
465+
const registrants = await challengeService.getChallengeRegistrants(
466+
challengeId
467+
);
468+
const isRegistered = _.some(
469+
registrants,
470+
(r) => `${r.memberId}` === `${userId}`
471+
);
467472
return { isRegistered };
468473
}
469474

470-
471475
export default createActions({
472476
CHALLENGE: {
473477
DROP_CHECKPOINTS: dropCheckpoints,

src/components/challenge-listing/ChallengeLoading/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export default function ChallengeLoading() {
1515
<div styleName="prize-nominal placeholder-template"></div>
1616
</div>
1717
</div>
18-
)
18+
);
1919
}

src/containers/Challenges/Listing/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ const Listing = ({
113113
</div>
114114
</div>
115115
</Panel.Header>
116-
{loadingChallenges ?
117-
_.times(3, () => <ChallengeLoading />) :
118-
challenges.length ? (
116+
{loadingChallenges ? (
117+
_.times(3, () => <ChallengeLoading />)
118+
) : challenges.length ? (
119119
<Panel.Body>
120120
{challenges.map((challenge, index) => (
121121
<div

src/containers/Challenges/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const mapStateToProps = (state) => ({
157157
recommendedChallenges: state.challenges.recommendedChallenges,
158158
initialized: state.challenges.initialized,
159159
tags: state.filter.challenge.tags,
160-
loadingChallenges: state.challenges.loadingChallenges
160+
loadingChallenges: state.challenges.loadingChallenges,
161161
});
162162

163163
const mapDispatchToProps = {

src/reducers/challenge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ function onGetIsRegistered(state, { error, payload }) {
491491
...state,
492492
challenge: {
493493
...state.challenge,
494-
isRegistered: payload.isRegistered
495-
}
494+
isRegistered: payload.isRegistered,
495+
},
496496
};
497497
}
498498

src/services/challenge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ async function getChallenge(challengeId) {
113113

114114
export default {
115115
getChallenge,
116-
getChallengeRegistrants
116+
getChallengeRegistrants,
117117
};

0 commit comments

Comments
 (0)