Skip to content

Memoize DiscountProgressBar tier scans and derived values #987

Description

@RUKAYAT-CODER

Overview
In src/components/courses/DiscountProgressBar.tsx the two useMemo blocks (lines 51-60) key off normalizedSpend, but the tier markers/list (lines 107-128) re-scan with the raw currentSpend on every render, and maxThreshold/progressPercent (lines 46-48) are recomputed unmemoized each render. Memoize the tier scans and derived values consistently.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions