Skip to content

Commit 754ef8d

Browse files
committed
Update banner
1 parent 4da7e6f commit 754ef8d

File tree

3 files changed

+37
-27
lines changed

3 files changed

+37
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@cosmjs/encoding": "^0.31.1",
1818
"@cosmjs/stargate": "^0.31.1",
1919
"@dydxprotocol/v4-client-js": "^0.40.2",
20-
"@dydxprotocol/v4-localization": "^1.0.2",
20+
"@dydxprotocol/v4-localization": "^1.1.258",
2121
"@ethersproject/providers": "^5.7.2",
2222
"@radix-ui/react-accordion": "^1.1.2",
2323
"@radix-ui/react-checkbox": "^1.0.4",

pnpm-lock.yaml

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/views/Banner.tsx

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
1-
import { layoutMixins } from '@/styles/layoutMixins';
21
import styled, { AnyStyledComponent } from 'styled-components';
32

4-
import { ButtonSize, ButtonType } from '@/constants/buttons';
53
import { STRING_KEYS } from '@/constants/localization';
64
import breakpoints from '@/styles/breakpoints';
75
import { useStringGetter } from '@/hooks';
86

97
import { Button } from '@/components/Button';
8+
import { Link } from '@/components/Link';
109

1110
export const Banner = () => {
1211
const stringGetter = useStringGetter();
13-
const stakingLearnMoreLink = import.meta.env.VITE_STAKING_LEARN_MORE_LINK;
14-
const launchBlogPostLink = import.meta.env.VITE_LAUNCH_BLOG_POST_LINK;
12+
const voteLink = import.meta.env.VITE_PROPOSAL_189;
13+
const smartContractInfo = import.meta.env.VITE_WETH_DYDX_SMART_CONTRACT;
14+
const cessationBlogPost = import.meta.env.VITE_CESSATION_OF_WETH_DYDX_SMART_CONTRACT_SUPPORT;
1515

16-
return !(stakingLearnMoreLink || launchBlogPostLink) ? null : (
16+
return voteLink && smartContractInfo && cessationBlogPost ? (
1717
<Styled.Banner>
18-
{stakingLearnMoreLink && (
19-
<Styled.Button size={ButtonSize.XSmall} href={stakingLearnMoreLink} type={ButtonType.Link}>
20-
{stringGetter({ key: STRING_KEYS.HOW_TO_STAKE })}
21-
</Styled.Button>
22-
)}
23-
{launchBlogPostLink && (
24-
<Styled.Button size={ButtonSize.XSmall} href={launchBlogPostLink} type={ButtonType.Link}>
25-
{stringGetter({ key: STRING_KEYS.READ_LAUNCH_BLOG_POST })}
26-
</Styled.Button>
27-
)}
18+
{stringGetter({
19+
key: STRING_KEYS.BANNER_CEASE_SUPPORT_WETHDYDX,
20+
params: {
21+
VOTE: <Link href={voteLink}>{stringGetter({ key: STRING_KEYS.VOTE })}</Link>,
22+
SMART_CONTRACT: (
23+
<Link href={smartContractInfo}>
24+
{stringGetter({ key: STRING_KEYS.WETHDYDX_SMART_CONTRACT })}
25+
</Link>
26+
),
27+
BLOG_POST: <Link href={cessationBlogPost}></Link>,
28+
},
29+
})}
2830
</Styled.Banner>
29-
);
31+
) : null;
3032
};
3133

3234
const Styled: Record<string, AnyStyledComponent> = {};
3335

3436
Styled.Banner = styled.div`
35-
${layoutMixins.row}
3637
align-items: baseline;
37-
gap: 0.5rem;
38-
39-
flex-wrap: wrap;
40-
justify-content: center;
41-
padding: 0.5rem 1rem;
38+
padding: 1rem;
4239
text-align: center;
4340
4441
@media ${breakpoints.tablet} {
@@ -47,6 +44,15 @@ Styled.Banner = styled.div`
4744
4845
background-color: var(--color-layer-4);
4946
font: var(--font-small-book);
47+
48+
a {
49+
color: var(--color-accent);
50+
display: inline;
51+
}
52+
53+
a:visited {
54+
color: var(--color-accent);
55+
}
5056
`;
5157

5258
Styled.Button = styled(Button)`

0 commit comments

Comments
 (0)