From a972081060899e4a65c79348386beb1ce875a4eb Mon Sep 17 00:00:00 2001 From: Zak Date: Mon, 3 Jun 2024 12:06:05 +0100 Subject: [PATCH] feat: return missing debt repay guide --- src/components/vault/BorrowModal.jsx | 7 +- src/components/vault/EurosCompare.jsx | 167 +++++++++++++------------- src/components/vault/RepayModal.jsx | 153 ++++++++++++----------- 3 files changed, 168 insertions(+), 159 deletions(-) diff --git a/src/components/vault/BorrowModal.jsx b/src/components/vault/BorrowModal.jsx index 8c83b5e..a3915d3 100644 --- a/src/components/vault/BorrowModal.jsx +++ b/src/components/vault/BorrowModal.jsx @@ -125,7 +125,7 @@ const BorrowModal = (props) => { - ) + ); } return ( @@ -210,10 +210,7 @@ const BorrowModal = (props) => { -
-
- -
+
diff --git a/src/components/vault/EurosCompare.jsx b/src/components/vault/EurosCompare.jsx index e8fc0b8..b257b5e 100644 --- a/src/components/vault/EurosCompare.jsx +++ b/src/components/vault/EurosCompare.jsx @@ -80,88 +80,93 @@ const EurosCompare = () => { if (currentDiscount < 0) { return ( -
-
- - Repay Your Debt for a Discount - - - Take advantage of market conditions to reduce your EUROs debt. -
- When the EUROs Value dips below the FX market price of EUR, you have the opportunity to repay your debt at discount. Act swiftly to lock in your savings and strengthen your financial position. -
-
- -
- - Current Savings Opportunity: - -
- - EUR FX market price (USD): - - - ${chainPrice} - -
- -
- - EUROs price (USD): - - - ${poolPrice} - -
- -
- - Current discount %: - - - {showDiscount.toFixed(2)}% - +
+
+
+
+
+ + Repay Your Debt for a Discount + + + Take advantage of market conditions to reduce your EUROs debt. +
+ When the EUROs Value dips below the FX market price of EUR, you have the opportunity to repay your debt at discount. Act swiftly to lock in your savings and strengthen your financial position. +
+
+ +
+ + Current Savings Opportunity: + +
+ + EUR FX market price (USD): + + + ${chainPrice} + +
+ +
+ + EUROs price (USD): + + + ${poolPrice} + +
+ +
+ + Current discount %: + + + {showDiscount.toFixed(2)}% + +
+ +
+ +
+ + Act Now: Save {showDiscount.toFixed(2)}% on Repayment + +
- -
- -
- - Act Now: Save {showDiscount.toFixed(2)}% on Repayment -
); diff --git a/src/components/vault/RepayModal.jsx b/src/components/vault/RepayModal.jsx index 257adc3..eba501d 100644 --- a/src/components/vault/RepayModal.jsx +++ b/src/components/vault/RepayModal.jsx @@ -5,6 +5,7 @@ import { } from '@heroicons/react/24/outline'; import VaultHealth from "./VaultHealth"; +import EurosCompare from "./EurosCompare"; import Modal from "../ui/Modal"; import Button from "../ui/Button"; @@ -157,91 +158,97 @@ const RepayModal = (props) => { - - - Repaying EUROs - +
+
+ + + Repaying EUROs + -
- - Repay Amount - - - Remaining: {getInputMax()} - -
-
- handleAmount(e, 'REPAY')} - disabled={isPending} - useRef={inputRef} - /> - - -
- -
- -
- -
- {repayValues.map((item) => ( -
+
- {item.key} + Repay Amount - {item.value || '0'} + Remaining: {getInputMax()}
- ))} -
+
+ handleAmount(e, 'REPAY')} + disabled={isPending} + useRef={inputRef} + /> -
- - + +
+ +
+ +
+ +
+ {repayValues.map((item) => ( +
+ + {item.key} + + + {item.value || '0'} + +
+ ))} +
+ +
+ + +
+
+