Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgasper committed Dec 14, 2023
1 parent a36a464 commit 5d69c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/ChallengeEditor/ChallengeView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ const ChallengeView = ({
const showCheckpointPrizes = _.get(challenge, 'timelineTemplateId') === MULTI_ROUND_CHALLENGE_TEMPLATE_ID
const isDataScience = challenge.trackId === DS_TRACK_ID
const useDashboardData = _.find(challenge.metadata, { name: 'show_data_dashboard' })
const useDashboard = useDashboardData ?
(_.isString(useDashboardData.value) && useDashboardData.value === "true") ||
const useDashboard = useDashboardData
? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
(_.isBoolean(useDashboardData.value) && useDashboardData.value) : false

return (
Expand Down
12 changes: 6 additions & 6 deletions src/components/ChallengeEditor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,10 @@ class ChallengeEditor extends Component {
}
let useDashboard = _.find(challengeMetadata, { name: 'show_data_dashboard' })
if (useDashboard === undefined) {
useDashboard = { name: 'show_data_dashboard', value: "false" }
} else if(_.isBoolean(useDashboard.value)){
useDashboard = { name: 'show_data_dashboard', value: 'false' }
} else if (_.isBoolean(useDashboard.value)) {
useDashboard = { name: 'show_data_dashboard', value: _.toString(useDashboard.value) }
}
}

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

const useDashboard = useDashboardData
? (_.isString(useDashboardData.value) && useDashboardData.value === 'true') ||
(_.isBoolean(useDashboardData.value) && useDashboardData.value) : false

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

Expand Down

0 comments on commit 5d69c67

Please sign in to comment.