Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

bring master up to date #70

Merged
merged 9 commits into from
Nov 16, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
set trigger point to reveal the final scores
  • Loading branch information
Dushyant Bhalgami committed Nov 16, 2019
commit b44be594e76df556d2daba7c66204c516d8514b6
7 changes: 4 additions & 3 deletions pages/problem-statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class ProblemStatement extends React.Component {
problemDescription: data.fields.problemStatementDescription,
isDev: data.fields.isDevTrack,
isF2f: data.fields.isF2fTrack,
isQa: data.fields.isQaTrack
isQa: data.fields.isQaTrack,
showFinalScore: data.fields.showFinalScore
}
}

Expand All @@ -85,7 +86,7 @@ class ProblemStatement extends React.Component {
setupLeaderboard () {
const { publicRuntimeConfig } = getConfig()

prepareLeaderboard(this.props.challengeId, this.props.members, this.props.groupId, this.props.challengeIds, this.props.isF2f)
prepareLeaderboard(this.props.challengeId, this.props.members, this.props.groupId, this.props.challengeIds, this.props.isF2f, this.props.showFinalScore)
.then((leaderboard) => {
const finalResultsAvailable = leaderboard.every(l => {
let hasScore = false
Expand All @@ -99,7 +100,7 @@ class ProblemStatement extends React.Component {
return hasScore
})

if (finalResultsAvailable && publicRuntimeConfig.revealFinalScore) {
if (finalResultsAvailable && this.props.showFinalScore) {
this.finalLeaderboard = JSON.parse(JSON.stringify(leaderboard))

leaderboard = leaderboard.map(l => {
Expand Down