Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

code improvements

Pedro Ladeiracd0042a226f5
diff --git a/apps/web/ui/partners/lander/blocks/earnings-calculator-block.tsx b/apps/web/ui/partners/lander/blocks/earnings-calculator-block.tsx
index 30f214813b..7805dfc06d 100644
--- a/apps/web/ui/partners/lander/blocks/earnings-calculator-block.tsx
+++ b/apps/web/ui/partners/lander/blocks/earnings-calculator-block.tsx
@@ -27,7 +27,7 @@ export function EarningsCalculatorBlock({
}) {
const id = useId();
const min = block.data.minSales ?? DEFAULT_SLIDER_MIN;
- const max = block.data.maxSales ?? DEFAULT_SLIDER_MAX;
+ const max = block.data.maxSales ?? Math.max(DEFAULT_SLIDER_MAX, min);
const sliderMin = max < min ? DEFAULT_SLIDER_MIN : min;
const sliderMax = max < min ? DEFAULT_SLIDER_MAX : max;
const [value, setValue] = useState(() =>