diff --git a/webapp/src/components/RootApp.tsx b/webapp/src/components/RootApp.tsx index b39a9520..9a85b8d8 100644 --- a/webapp/src/components/RootApp.tsx +++ b/webapp/src/components/RootApp.tsx @@ -17,6 +17,7 @@ import YourPositionModal from "./Vault/Modal/YourPositionModal"; import PausePositionModal from "./Vault/Modal/PausePositionModal"; import ResumePositionModal from "./Vault/Modal/ResumePositionModal"; import EarnPage from "../pages/DepositPage/EarnPage"; + const Root = styled.div<{ screenHeight: number }>` background-color: ${colors.background.one}; min-height: ${(props) => diff --git a/webapp/src/pages/DepositPage/EarnPage.tsx b/webapp/src/pages/DepositPage/EarnPage.tsx index 3f695182..2fc53a39 100644 --- a/webapp/src/pages/DepositPage/EarnPage.tsx +++ b/webapp/src/pages/DepositPage/EarnPage.tsx @@ -60,6 +60,7 @@ import { } from "shared/lib/hooks/useGeofence"; import TextPreview from "shared/lib/components/TextPreview/TextPreview"; import Geoblocked from "shared/lib/components/Geoblocked/Geoblocked"; +import Banner from "shared/lib/components/Banner/Banner"; const delayedFade = css<{ delay?: number }>` opacity: 0; @@ -67,6 +68,12 @@ const delayedFade = css<{ delay?: number }>` animation-delay: ${({ delay }) => `${delay || 0}s`}; `; +const AbsoluteContainer = styled.div` + position: absolute; + width: 100%; + top: 0; +`; + const { formatUnits } = ethers.utils; const PendingOrLogoContainer = styled.div<{ delay?: number }>` @@ -513,160 +520,171 @@ const EarnPage = () => { - - - {showVault.show ? ( - - - - {hasPendingDeposits ? ( - +
+ + + + + + {showVault.show ? ( + + + + {hasPendingDeposits ? ( + + + {logo} + + +

+ Your deposit will deployed in the vault in{" "} + + {strategyStartTime} + +

+
+
+ ) : ( {logo} - -

- Your deposit will deployed in the vault in{" "} - - {strategyStartTime} - -

-
- - ) : ( - - {logo} - - )} -
- Your Balance ({asset}) - - {isLoading || !account - ? "---" - : formatBigNumber( - BigNumber.from(investedInStrategy), - decimals, - decimalPlaces - )} - - - {roi > 0 && "+"} - {isLoading || roi === 0 ? "0.00" : roi.toFixed(4)}% - - { - setShowDetailsModal(true); - }} - delay={0.5} - > - View Details - - - {active && account ? ( - <> - { - setShowDepositModal(true); - }} - > - Deposit - - { - setShowWithdrawModal(true); - }} - > - Withdraw - - {showCompleteWithdraw && ( - + + Your Balance ({asset}) + + + {isLoading || !account + ? "---" + : formatBigNumber( + BigNumber.from(investedInStrategy), + decimals, + decimalPlaces + )} + + + {roi > 0 && "+"} + {isLoading || roi === 0 ? "0.00" : roi.toFixed(4)}% + + { + setShowDetailsModal(true); + }} + delay={0.5} + > + View Details + + + {active && account ? ( + <> + { - setShowCompleteModal(true); + setShowDepositModal(true); }} + disabled > -
- - - Complete your withdrawals - -
-
- )} - - ) : ( - setShowConnectModal(true)} - > - Connect Wallet - - )} -
- - {isLoading || isVaultMaxCapacity === undefined ? ( - loadingText - ) : isVaultMaxCapacity ? ( - Vault is currently full - ) : ( - formatAmount(totalDepositStr) + - " " + - asset + - " / " + - formatAmount(depositLimitStr) + - " " + - asset - )} - -
-
- ) : ( - - - - )} -
-
+ Deposit + + { + setShowWithdrawModal(true); + }} + > + Withdraw + + {showCompleteWithdraw && ( + { + setShowCompleteModal(true); + }} + > +
+ + + Complete your withdrawals + +
+
+ )} + + ) : ( + setShowConnectModal(true)} + > + Connect Wallet + + )} + + + {isLoading || isVaultMaxCapacity === undefined ? ( + loadingText + ) : isVaultMaxCapacity ? ( + Vault is currently full + ) : ( + formatAmount(totalDepositStr) + + " " + + asset + + " / " + + formatAmount(depositLimitStr) + + " " + + asset + )} + + + + ) : ( + + + + )} + + +
setShowDetailsModal(false)}