We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 914f345 commit ecca11dCopy full SHA for ecca11d
src/views/Affiliates/cards/AffiliateProgressCard.tsx
@@ -14,8 +14,9 @@ export const AffiliateProgressCard = ({
14
}) => {
15
const stringGetter = useStringGetter();
16
17
- const progressRatio = volume / AFFILIATES_REQUIRED_VOLUME_USD;
18
- const remaining = AFFILIATES_REQUIRED_VOLUME_USD - volume;
+ const progressRatio = Math.min(1, volume / AFFILIATES_REQUIRED_VOLUME_USD);
+ const remaining = Math.max(0, AFFILIATES_REQUIRED_VOLUME_USD - volume);
19
+
20
return (
21
<div className={className} tw="flex flex-col gap-1.5 rounded-1 p-1">
22
<div tw="flex items-center justify-between gap-0.5">
0 commit comments