From 4bfee18496b1e6340c81610d03d38f832e2d9513 Mon Sep 17 00:00:00 2001 From: mikeghen Date: Wed, 19 Apr 2023 11:01:19 -0400 Subject: [PATCH] legacy banner, disable start, enable stop buttons --- src/components/layout/Banner/index.tsx | 15 +++++++++ .../layout/Banner/styles.module.scss | 32 ++++++++++++++++++ src/components/layout/CoinRateForm/index.tsx | 33 +++++++------------ src/components/layout/PanelChange/index.tsx | 26 --------------- src/containers/MainLayout/index.tsx | 2 ++ src/containers/MainLayout/styles.module.scss | 7 ++++ 6 files changed, 67 insertions(+), 48 deletions(-) create mode 100644 src/components/layout/Banner/index.tsx create mode 100644 src/components/layout/Banner/styles.module.scss diff --git a/src/components/layout/Banner/index.tsx b/src/components/layout/Banner/index.tsx new file mode 100644 index 00000000..66a95518 --- /dev/null +++ b/src/components/layout/Banner/index.tsx @@ -0,0 +1,15 @@ +import React, { FC } from 'react'; +import { FontIcon, FontIconName } from 'components/common/FontIcon'; +import styles from './styles.module.scss'; + +export const Banner: FC = () => { + return ( +
+ + + Version 3 REX Markets are live! Please close your streams and visit{' '} + app.ricochet.exchange to start using the new version. + +
+ ); +}; diff --git a/src/components/layout/Banner/styles.module.scss b/src/components/layout/Banner/styles.module.scss new file mode 100644 index 00000000..7544aed5 --- /dev/null +++ b/src/components/layout/Banner/styles.module.scss @@ -0,0 +1,32 @@ +@import "../../../assets/styles/mixins"; + +.banner { + top: 0; + right: 0; + left: 0; + z-index: 100000; + position: fixed; + background-color: var(--color-red); + color: var(--color-black-dark); + margin: auto; + padding: 4px; + -moz-box-flex: 1; + flex-grow: 1; + -moz-box-pack: center; + justify-content: center; + -moz-box-align: center; + align-items: center; + text-align: center; + display: block; + font-size: 0.75rem; + line-height: 1.66; + letter-spacing: 0.03333em; + + @include tablet { + padding: 8px 45px; + } + + i { + margin-right: 5px; + } +} \ No newline at end of file diff --git a/src/components/layout/CoinRateForm/index.tsx b/src/components/layout/CoinRateForm/index.tsx index 95fd2bc6..fb47b6ac 100644 --- a/src/components/layout/CoinRateForm/index.tsx +++ b/src/components/layout/CoinRateForm/index.tsx @@ -58,16 +58,7 @@ export const CoinRateForm: FC = ({ color="primary" onClick={onClickStart} className={styles.start} - disabled={ - isReadOnly || - isLoading || - !Boolean(parseInt(coinBalanceA ?? '') > 0) || - !value || - ((Math.floor(((parseFloat(value) / 2592000) * 1e18) / shareScaler) * shareScaler) / - 1e18) * - 2592000 === - 0 - } + disabled={true} isLoading={isLoading} > {t('Start')}/{t('Edit')} @@ -75,18 +66,16 @@ export const CoinRateForm: FC = ({
- {parseFloat(personalFlow) > 0 && ( - - {t('Stop')} - - )} + + {t('Stop')} +
diff --git a/src/components/layout/PanelChange/index.tsx b/src/components/layout/PanelChange/index.tsx index 283aa499..040fc5c4 100644 --- a/src/components/layout/PanelChange/index.tsx +++ b/src/components/layout/PanelChange/index.tsx @@ -427,32 +427,6 @@ export const PanelChange: FC = ({ {`$${totalFlow && getFlowUSDValue(totalFlow)}`} {t('per month')} - {fireIconsCheck(coinA, coinB) ? ( - - - 🔥 - - - - Total rewards: {emissionRate} RIC/mo. -
- Your rewards: {userRewards} RIC/mo. -
-
-
- ) : ( - - )} {`${totalFlow && totalFlow} ${coinA}x / ${t('Month')}`} diff --git a/src/containers/MainLayout/index.tsx b/src/containers/MainLayout/index.tsx index eacc0164..bc45b558 100644 --- a/src/containers/MainLayout/index.tsx +++ b/src/containers/MainLayout/index.tsx @@ -1,6 +1,7 @@ import React from 'react'; import { useShallowSelector } from 'hooks/useShallowSelector'; import { selectMain } from 'store/main/selectors'; +import { Banner } from 'components/layout/Banner'; import { HeaderContainer } from 'containers/main/HeaderContainer'; import { InvestNav } from 'components/layout/InvestNav'; import { RICAddress } from 'constants/polygon_config'; @@ -14,6 +15,7 @@ export const MainLayout: React.FC = ({ children }) => { return (
+
diff --git a/src/containers/MainLayout/styles.module.scss b/src/containers/MainLayout/styles.module.scss index 01809082..f1f24e61 100644 --- a/src/containers/MainLayout/styles.module.scss +++ b/src/containers/MainLayout/styles.module.scss @@ -4,6 +4,10 @@ width: 100%; } +.header { + margin-top: 25px; +} + .content { grid-area: content; width: 100%; @@ -17,6 +21,9 @@ height: 80px; margin-top: 10vh; } + .header { + margin-top: 25px; + } .content { max-width: 100vw; }