1
- import { layoutMixins } from '@/styles/layoutMixins' ;
2
1
import styled , { AnyStyledComponent } from 'styled-components' ;
3
2
4
- import { ButtonSize , ButtonType } from '@/constants/buttons' ;
5
3
import { STRING_KEYS } from '@/constants/localization' ;
6
4
import breakpoints from '@/styles/breakpoints' ;
7
5
import { useStringGetter } from '@/hooks' ;
8
6
9
7
import { Button } from '@/components/Button' ;
8
+ import { Link } from '@/components/Link' ;
10
9
11
10
export const Banner = ( ) => {
12
11
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 ;
15
15
16
- return ! ( stakingLearnMoreLink || launchBlogPostLink ) ? null : (
16
+ return voteLink && smartContractInfo && cessationBlogPost ? (
17
17
< 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
+ } ) }
28
30
</ Styled . Banner >
29
- ) ;
31
+ ) : null ;
30
32
} ;
31
33
32
34
const Styled : Record < string , AnyStyledComponent > = { } ;
33
35
34
36
Styled . Banner = styled . div `
35
- ${ layoutMixins . row }
36
37
align-items: baseline;
37
- gap: 0.5rem;
38
-
39
- flex-wrap: wrap;
40
- justify-content: center;
41
- padding: 0.5rem 1rem;
38
+ padding: 1rem;
42
39
text-align: center;
43
40
44
41
@media ${ breakpoints . tablet } {
@@ -47,6 +44,15 @@ Styled.Banner = styled.div`
47
44
48
45
background-color: var(--color-layer-4);
49
46
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
+ }
50
56
` ;
51
57
52
58
Styled . Button = styled ( Button ) `
0 commit comments