Skip to content

Commit

Permalink
fix: improve points multiplier handling in tile components
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgraeme committed Jan 1, 2025
1 parent 1bb5aca commit 66ad21f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const PointsTileFormattedPoints = (): JSX.Element | null => {
} = configuration as PointsTileConfig;

if (points === undefined) return null;
const calculatedPoints = points * multiplier;
const calculatedPoints = points * Number(multiplier ?? 1);
const fullPointsText = `${pointsPrefix}${calculatedPoints} ${pointsSuffix}`;

return (
Expand Down
2 changes: 1 addition & 1 deletion lib/components/organisms/RewardTile/reward-tile-points.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const RewardTilePoints = (): JSX.Element | null => {
if (!showPrice || price === undefined) return null;

// Calculate points
const calculatedPoints = price * Number(pointsMultiplier);
const calculatedPoints = price * Number(pointsMultiplier ?? 1);
const fullPointsText = `${pointsPrefix}${calculatedPoints} ${pointsSuffix}`;

return (
Expand Down

0 comments on commit 66ad21f

Please sign in to comment.