Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add banner to legacy site, disable start streams #910

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/components/layout/Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className={styles.banner}>
<FontIcon name={FontIconName.Warning} size={12} />
<span>
Version 3 REX Markets are live! Please close your streams and visit{' '}
<a href="https://app.ricochet.exchange">app.ricochet.exchange</a> to start using the new version.
</span>
</div>
);
};
32 changes: 32 additions & 0 deletions src/components/layout/Banner/styles.module.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
33 changes: 11 additions & 22 deletions src/components/layout/CoinRateForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,24 @@ export const CoinRateForm: FC<IProps> = ({
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')}
</ButtonNew>
</span>
</div>
<div className={styles.stop_wrap}>
{parseFloat(personalFlow) > 0 && (
<ButtonNew
loaderColor="#363B55"
color="secondary"
onClick={onClickStop}
className={styles.stop}
disabled={isReadOnly || isLoading}
isLoading={isLoading}
>
{t('Stop')}
</ButtonNew>
)}
<ButtonNew
loaderColor="#363B55"
color="secondary"
onClick={onClickStop}
className={styles.stop}
disabled={isReadOnly || isLoading}
isLoading={isLoading}
>
{t('Stop')}
</ButtonNew>
</div>
<div style={{ flexBasis: '100%', height: '0' }}> </div>

Expand Down
26 changes: 0 additions & 26 deletions src/components/layout/PanelChange/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,32 +427,6 @@ export const PanelChange: FC<IProps> = ({
{`$${totalFlow && getFlowUSDValue(totalFlow)}`}
</span>
{t('per month')}
{fireIconsCheck(coinA, coinB) ? (
<span>
<span
data-tip
data-for={`depositTooltipTotal-${uuid}`}
style={{ marginLeft: '6px' }}
>
🔥
</span>
<ReactTooltip
id={`depositTooltipTotal-${uuid}`}
place="right"
effect="solid"
multiline
className={styles.depositTooltip}
>
<span className={styles.depositTooltip_span}>
Total rewards: {emissionRate} RIC/mo.
<br />
Your rewards: {userRewards} RIC/mo.
</span>
</ReactTooltip>
</span>
) : (
<span />
)}
</span>
<span className={styles.token_amounts}>
<span>{`${totalFlow && totalFlow} ${coinA}x / ${t('Month')}`}</span>
Expand Down
2 changes: 2 additions & 0 deletions src/containers/MainLayout/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -14,6 +15,7 @@ export const MainLayout: React.FC<IProps> = ({ children }) => {
return (
<div className={styles.container}>
<div className={styles.header}>
<Banner />
<HeaderContainer balance={balances && balances[RICAddress]} address={address || 'Connect Wallet'} />
</div>

Expand Down
7 changes: 7 additions & 0 deletions src/containers/MainLayout/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
width: 100%;
}

.header {
margin-top: 25px;
}

.content {
grid-area: content;
width: 100%;
Expand All @@ -17,6 +21,9 @@
height: 80px;
margin-top: 10vh;
}
.header {
margin-top: 25px;
}
.content {
max-width: 100vw;
}
Expand Down