From f2fdccccb199e22042b06ecb7ddf5ec62c8eaf2a 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 2a81b14..839d3be 100644 --- a/components/BorrowForm/BorrowForm.tsx +++ b/components/BorrowForm/BorrowForm.tsx @@ -494,8 +494,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))