1- import { layoutMixins } from '@/styles/layoutMixins' ;
21import styled , { AnyStyledComponent } from 'styled-components' ;
32
4- import { ButtonSize , ButtonType } from '@/constants/buttons' ;
53import { STRING_KEYS } from '@/constants/localization' ;
64import breakpoints from '@/styles/breakpoints' ;
75import { useStringGetter } from '@/hooks' ;
86
97import { Button } from '@/components/Button' ;
8+ import { Link } from '@/components/Link' ;
109
1110export 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
3234const Styled : Record < string , AnyStyledComponent > = { } ;
3335
3436Styled . 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
5258Styled . Button = styled ( Button ) `
0 commit comments