Skip to content

Commit

Permalink
[PAY-3983] Fix missing status label on reward panels (#11506)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Mar 4, 2025
1 parent ed24d42 commit d898567
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/common/src/hooks/useAudioRewards.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { ChallengeName, OptimisticUserChallenge } from '~/models'
import { fillString, formatNumberCommas } from '~/utils'
import {
fillString,
formatNumberCommas,
getChallengeStatusLabel
} from '~/utils'

const messages = {
completeLabel: 'COMPLETE',
Expand Down Expand Up @@ -75,6 +79,12 @@ export const useFormattedProgressLabel = ({
challenge?.disbursed_amount > 0
) {
label = messages.completeLabel
} else if (
challenge?.challenge_id === ChallengeName.FirstWeeklyComment ||
challenge?.challenge_id === ChallengeName.AudioMatchingBuy ||
challenge?.challenge_id === ChallengeName.AudioMatchingSell
) {
label = getChallengeStatusLabel(challenge, challenge?.challenge_id)
} else {
// Count down
label = fillString(
Expand Down

0 comments on commit d898567

Please sign in to comment.