From a09370d44ababeb672e6acf1b37b0fcada6c1095 Mon Sep 17 00:00:00 2001 From: daan Date: Wed, 7 Dec 2022 16:35:11 +0100 Subject: [PATCH] set max slider point to 50% --- components/BorrowForm/BorrowForm.tsx | 3 ++- components/HoneySlider/utlls.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/components/BorrowForm/BorrowForm.tsx b/components/BorrowForm/BorrowForm.tsx index cb24b21..37f6847 100644 --- a/components/BorrowForm/BorrowForm.tsx +++ b/components/BorrowForm/BorrowForm.tsx @@ -484,8 +484,9 @@ const BorrowForm = (props: BorrowProps) => { minAvailableValue={borrowedValue} maxSafePosition={0.3 - borrowedValue / 1000} dangerPosition={0.45 - borrowedValue / 1000} - maxAvailablePosition={collateralFactor} + maxAvailablePosition={0.5} onChange={handleSliderChange} + labels={[0, 25, 50]} /> ); diff --git a/components/HoneySlider/utlls.ts b/components/HoneySlider/utlls.ts index 5e8298e..e0f145c 100644 --- a/components/HoneySlider/utlls.ts +++ b/components/HoneySlider/utlls.ts @@ -69,7 +69,7 @@ export const getPositionedLabels = ({ left: 'initial', right: '0', transform: 'initial', - display: lastLabelValue < 1 ? 'none' : 'initial' + display: lastLabelValue < 1 && !labels.length ? 'none' : 'initial' } : {}, label: fpr(Math.round(label))