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

Commit b44be59

Browse files
author
Dushyant Bhalgami
committed
set trigger point to reveal the final scores
1 parent 768b11e commit b44be59

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pages/problem-statement.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class ProblemStatement extends React.Component {
7474
problemDescription: data.fields.problemStatementDescription,
7575
isDev: data.fields.isDevTrack,
7676
isF2f: data.fields.isF2fTrack,
77-
isQa: data.fields.isQaTrack
77+
isQa: data.fields.isQaTrack,
78+
showFinalScore: data.fields.showFinalScore
7879
}
7980
}
8081

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

88-
prepareLeaderboard(this.props.challengeId, this.props.members, this.props.groupId, this.props.challengeIds, this.props.isF2f)
89+
prepareLeaderboard(this.props.challengeId, this.props.members, this.props.groupId, this.props.challengeIds, this.props.isF2f, this.props.showFinalScore)
8990
.then((leaderboard) => {
9091
const finalResultsAvailable = leaderboard.every(l => {
9192
let hasScore = false
@@ -99,7 +100,7 @@ class ProblemStatement extends React.Component {
99100
return hasScore
100101
})
101102

102-
if (finalResultsAvailable && publicRuntimeConfig.revealFinalScore) {
103+
if (finalResultsAvailable && this.props.showFinalScore) {
103104
this.finalLeaderboard = JSON.parse(JSON.stringify(leaderboard))
104105

105106
leaderboard = leaderboard.map(l => {

0 commit comments

Comments
 (0)