Skip to content

PM-3541 home points challenge#7176

Merged
vas3a merged 3 commits intodevelopfrom
PM-3541_home-points-challenge
Feb 16, 2026
Merged

PM-3541 home points challenge#7176
vas3a merged 3 commits intodevelopfrom
PM-3541_home-points-challenge

Conversation

@vas3a
Copy link
Collaborator

@vas3a vas3a commented Feb 16, 2026

Community home opportunities feed shows point based challenges with $ symbol

@vas3a vas3a merged commit 43d387c into develop Feb 16, 2026
7 checks passed
.filter(set => set.type === 'PLACEMENT')
.flatMap(item => item.prizes);
const prizeTotal = _.sum(placementPrizes.map(prize => prize.value));
const prizeType = placementPrizes.length > 0 ? placementPrizes[0].type : null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The logic assumes that all prizes in placementPrizes have the same type. If there is a mix of prize types, this could lead to incorrect behavior. Consider verifying that all prize types are consistent or handling mixed types appropriately.

const prizeTotal = _.sum(placementPrizes.map(prize => prize.value));
const prizeType = placementPrizes.length > 0 ? placementPrizes[0].type : null;
const isPointBasedPrize = prizeType === 'POINT';
const prizeSymbol = isPointBasedPrize ? '' : '$';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ correctness]
The variable prizeSymbol is determined based on the first prize's type. If placementPrizes contains a mix of types, this could result in an incorrect symbol being displayed. Ensure that the prize type check is robust against such cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant