Skip to content

Commit 5d69c67

Browse files
committed
Lint
1 parent a36a464 commit 5d69c67

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ const ChallengeView = ({
102102
const showCheckpointPrizes = _.get(challenge, 'timelineTemplateId') === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
103103
const isDataScience = challenge.trackId === DS_TRACK_ID
104104
const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' })
105-
const useDashboard = useDashboardData ?
106-
(_.isString(useDashboardData.value) && useDashboardData.value === "true") ||
105+
const useDashboard = useDashboardData
106+
? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
107107
(_.isBoolean(useDashboardData.value) && useDashboardData.value) : false
108108

109109
return (

src/components/ChallengeEditor/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,10 @@ class ChallengeEditor extends Component {
10691069
}
10701070
let useDashboard = _.find(challengeMetadata, { name: 'show_data_dashboard' })
10711071
if (useDashboard === undefined) {
1072-
useDashboard = { name: 'show_data_dashboard', value: "false" }
1073-
} else if(_.isBoolean(useDashboard.value)){
1072+
useDashboard = { name: 'show_data_dashboard', value: 'false' }
1073+
} else if (_.isBoolean(useDashboard.value)) {
10741074
useDashboard = { name: 'show_data_dashboard', value: _.toString(useDashboard.value) }
1075-
}
1075+
}
10761076

10771077
newChallenge.metadata.push(useDashboard)
10781078
}
@@ -1650,10 +1650,10 @@ class ChallengeEditor extends Component {
16501650
const showDashBoard = (challenge.trackId === DS_TRACK_ID && isChallengeType) || (isDevChallenge && isMM)
16511651
const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' })
16521652

1653+
const useDashboard = useDashboardData
1654+
? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
1655+
(_.isBoolean(useDashboardData.value) && useDashboardData.value) : false
16531656

1654-
const useDashboard = useDashboardData ?
1655-
(_.isString(useDashboardData.value) && useDashboardData.value === "true") ||
1656-
(_.isBoolean(useDashboardData.value) && useDashboardData.value) : false
16571657
const workTypes = getDomainTypes(challenge.trackId)
16581658
const filteredTypes = metadata.challengeTypes.filter(type => workTypes.includes(type.abbreviation))
16591659

0 commit comments

Comments
 (0)