1
1
import { useTranslation } from "next-i18next"
2
- import { useTheme } from "@chakra-ui/react"
3
2
4
3
import type { StakingPage , TranslationKey } from "@/lib/types"
5
4
@@ -8,21 +7,19 @@ import {
8
7
StakingGlyphCPUIcon ,
9
8
StakingGlyphTokenWalletIcon ,
10
9
} from "@/components/icons/staking"
11
- import InlineLink from "@/components/Link"
12
- import OldHeading from "@/components/OldHeading"
13
- import Text from "@/components/OldText"
14
10
15
11
import { cn } from "@/lib/utils/cn"
16
12
import { MatomoEventOptions , trackCustomEvent } from "@/lib/utils/matomo"
17
13
18
14
import { Flex } from "../ui/flex"
15
+ import InlineLink from "../ui/Link"
19
16
20
17
interface DataType {
21
18
title : TranslationKey
22
19
linkText : TranslationKey
23
20
href : string
24
21
matomo : MatomoEventOptions
25
- color : string
22
+ colorClassName : string
26
23
glyph : JSX . Element
27
24
}
28
25
@@ -32,8 +29,6 @@ export type StakingComparisonProps = {
32
29
}
33
30
34
31
const StakingComparison = ( { page, className } : StakingComparisonProps ) => {
35
- const theme = useTheme ( )
36
- const { stakingGold, stakingGreen, stakingBlue } = theme . colors
37
32
const { t } = useTranslation ( "page-staking" )
38
33
39
34
const solo : DataType = {
@@ -45,10 +40,8 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
45
40
eventAction : `Clicked` ,
46
41
eventName : "clicked solo staking" ,
47
42
} ,
48
- color : stakingGold ,
49
- glyph : (
50
- < StakingGlyphCPUIcon className = "h-[50px] w-[50px]" color = "stakingGold" />
51
- ) ,
43
+ colorClassName : "text-[#be8d10]" ,
44
+ glyph : < StakingGlyphCPUIcon className = "h-[50px] w-[50px] text-[#be8d10]" /> ,
52
45
}
53
46
const saas : DataType = {
54
47
title : "page-staking-saas-with-abbrev" ,
@@ -59,12 +52,9 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
59
52
eventAction : `Clicked` ,
60
53
eventName : "clicked staking as a service" ,
61
54
} ,
62
- color : stakingGreen ,
55
+ colorClassName : "text-[#129e5b]" ,
63
56
glyph : (
64
- < StakingGlyphCloudIcon
65
- className = "h-[28px] w-[50px]"
66
- color = "stakingGreen"
67
- />
57
+ < StakingGlyphCloudIcon className = "h-[28px] w-[50px] text-[#129e5b]" />
68
58
) ,
69
59
}
70
60
const pools : DataType = {
@@ -76,12 +66,9 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
76
66
eventAction : `Clicked` ,
77
67
eventName : "clicked pooled staking" ,
78
68
} ,
79
- color : stakingBlue ,
69
+ colorClassName : "text-[#0b83dc]" ,
80
70
glyph : (
81
- < StakingGlyphTokenWalletIcon
82
- className = "h-[39px] w-[50px]"
83
- color = "stakingBlue"
84
- />
71
+ < StakingGlyphTokenWalletIcon className = "h-[39px] w-[50px] text-[#0b83dc]" />
85
72
) ,
86
73
}
87
74
const data : {
@@ -131,22 +118,25 @@ const StakingComparison = ({ page, className }: StakingComparisonProps) => {
131
118
className
132
119
) }
133
120
>
134
- < OldHeading fontSize = "2rem ">
121
+ < h2 className = "text-4xl ">
135
122
{ t ( "page-staking-comparison-with-other-options" ) }
136
- </ OldHeading >
123
+ </ h2 >
137
124
{ selectedData . map (
138
- ( { title, linkText, href, color, content, glyph, matomo } , idx ) => (
125
+ (
126
+ { title, linkText, href, colorClassName, content, glyph, matomo } ,
127
+ idx
128
+ ) => (
139
129
< Flex className = "flex-col gap-6 md:flex-row" key = { idx } >
140
130
{ ! ! glyph && (
141
131
< Flex className = "max-h-12 w-12 flex-col items-center justify-start" >
142
132
{ glyph }
143
133
</ Flex >
144
134
) }
145
135
< div >
146
- < h3 className = { ` font-2xl text- ${ color } mb-2` } >
136
+ < h3 className = { cn ( " font-2xl mb-2" , colorClassName ) } >
147
137
{ t ( title ) }
148
138
</ h3 >
149
- < Text > { t ( content ) } </ Text >
139
+ < p > { t ( content ) } </ p >
150
140
< InlineLink
151
141
onClick = { ( ) => {
152
142
trackCustomEvent ( matomo )
0 commit comments