@woosmap/ui 4.226.14 → 4.226.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@ export default class PricingSlider extends Component {
|
|
|
54
54
|
if (pricing.length === 0) {
|
|
55
55
|
return valueNow;
|
|
56
56
|
}
|
|
57
|
-
const tierIndex = Math.min(Math.floor(valueNow / 100000), pricing.length -
|
|
57
|
+
const tierIndex = Math.min(Math.floor(valueNow / 100000), pricing.length - 2);
|
|
58
58
|
|
|
59
59
|
// eslint-disable-next-line prefer-destructuring
|
|
60
60
|
const tier = pricing[tierIndex][0];
|
|
@@ -62,6 +62,7 @@ export default class PricingSlider extends Component {
|
|
|
62
62
|
|
|
63
63
|
const previousTier = pricing[tierIndex - 1] ? pricing[tierIndex - 1][0] : 0;
|
|
64
64
|
const newValue = ((tier - previousTier) * value) / 100000 + previousTier;
|
|
65
|
+
console.log('coucou', newValue, pricing[pricing.length - 2][0], tier, tierIndex, pricing);
|
|
65
66
|
if (newValue > pricing[pricing.length - 2][0]) {
|
|
66
67
|
return '∞';
|
|
67
68
|
}
|
|
@@ -99,7 +100,7 @@ export default class PricingSlider extends Component {
|
|
|
99
100
|
value = 0;
|
|
100
101
|
} else {
|
|
101
102
|
const index = props.key / 100000 - 1;
|
|
102
|
-
if (index === displayedPricing.length -
|
|
103
|
+
if (index === displayedPricing.length - 1) {
|
|
103
104
|
value = '∞';
|
|
104
105
|
} else {
|
|
105
106
|
const tier = displayedPricing[props.key / 100000 - 1];
|