1
1
import React , { useState , useEffect } from "react"
2
2
import { useIntl } from "react-intl"
3
- import styled from "@emotion/styled"
4
3
import axios from "axios"
5
4
6
5
import Translation from "./Translation"
7
6
import Link from "./Link"
8
- import { FakeLinkExternal , CardItem as Item } from "./SharedStyledComponents"
9
7
10
8
import { translateMessageId } from "../utils/translations"
11
9
12
10
import { GATSBY_FUNCTIONS_PATH } from "../constants"
13
-
14
- const Section = styled . div `
15
- display: flex;
16
- flex-wrap: wrap;
17
- margin-top: 2rem;
18
- margin-bottom: 2rem;
19
- width: 100%;
20
- `
21
-
22
- const ErrorMsg = styled . div `
23
- color: ${ ( props ) => props . theme . colors . fail } ;
24
- `
11
+ import {
12
+ Box ,
13
+ Flex ,
14
+ Heading ,
15
+ LinkBox ,
16
+ LinkOverlay ,
17
+ ListItem ,
18
+ Text ,
19
+ UnorderedList ,
20
+ useToken ,
21
+ } from "@chakra-ui/react"
25
22
26
23
export interface Label {
27
24
name : string
@@ -44,24 +41,50 @@ export interface IPropsIssueSection {
44
41
}
45
42
46
43
const IssueSection : React . FC < IPropsIssueSection > = ( { issues } ) => {
44
+ const [ cardBoxShadow ] = useToken ( "colors" , [ "cardBoxShadow" ] )
45
+
47
46
if ( ! issues ) {
48
47
return null
49
48
}
50
49
return (
51
- < Section >
50
+ < Flex flexWrap = "wrap" my = { 8 } width = "full" gap = { 4 } >
52
51
{ issues . map ( ( issue , idx ) => {
53
52
const url = issue . html_url ? issue . html_url : "#"
54
53
return (
55
- < Item to = { url } key = { idx } hideArrow = { true } >
56
- < div > { issue . title } </ div >
57
- { issue . errorMsg && < ErrorMsg > { issue . errorMsg } </ ErrorMsg > }
58
- < div >
59
- { issue . html_url && < FakeLinkExternal > Discuss</ FakeLinkExternal > }
60
- </ div >
61
- </ Item >
54
+ < LinkBox
55
+ key = { idx }
56
+ flex = { { base : "1 1 240px" , sm : "0 1 240px" } }
57
+ w = "100%"
58
+ p = { 4 }
59
+ color = "text"
60
+ borderRadius = "2px"
61
+ border = "1px solid"
62
+ borderColor = "lightBorder"
63
+ transition = "all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1)"
64
+ cursor = "pointer"
65
+ _hover = { {
66
+ boxShadow : cardBoxShadow ,
67
+ border : "1px solid" ,
68
+ borderColor : "black300" ,
69
+ } }
70
+ >
71
+ < Box > { issue . title } </ Box >
72
+ { issue . errorMsg && (
73
+ < Text color = "fail" mb = { 0 } >
74
+ { issue . errorMsg }
75
+ </ Text >
76
+ ) }
77
+ < Box >
78
+ { issue . html_url && (
79
+ < LinkOverlay as = { Link } href = { url } >
80
+ Discuss
81
+ </ LinkOverlay >
82
+ ) }
83
+ </ Box >
84
+ </ LinkBox >
62
85
)
63
86
} ) }
64
- </ Section >
87
+ </ Flex >
65
88
)
66
89
}
67
90
@@ -158,94 +181,94 @@ const Roadmap: React.FC<IProps> = () => {
158
181
} , [ intl ] )
159
182
160
183
return (
161
- < div >
162
- < p >
184
+ < Box >
185
+ < Text >
163
186
< Translation id = "page-about-p-1" />
164
- </ p >
165
- < p >
187
+ </ Text >
188
+ < Text >
166
189
< Link to = "https://github.com/ethereum/ethereum-org-website/blob/master/LICENSE" >
167
190
< Translation id = "page-about-link-1" />
168
191
</ Link >
169
192
.
170
- </ p >
171
- < p >
193
+ </ Text >
194
+ < Text >
172
195
< Translation id = "page-about-p-2" /> { " " }
173
196
< Link to = "https://github.com/ethereum/ethereum-org-website" >
174
197
< Translation id = "page-about-link-2" />
175
198
</ Link >
176
199
< Translation id = "page-about-p-3" />
177
- </ p >
178
- < ul >
179
- < li >
200
+ </ Text >
201
+ < UnorderedList >
202
+ < ListItem >
180
203
< Translation id = "page-about-li-1" />
181
- </ li >
182
- < li >
204
+ </ ListItem >
205
+ < ListItem >
183
206
< Translation id = "page-about-li-2" />
184
- </ li >
185
- < li >
207
+ </ ListItem >
208
+ < ListItem >
186
209
< Translation id = "page-about-li-3" />
187
- </ li >
188
- </ ul >
189
- < p >
210
+ </ ListItem >
211
+ </ UnorderedList >
212
+ < Text >
190
213
< Translation id = "page-about-p-4" />
191
- </ p >
192
- < h3 >
214
+ </ Text >
215
+ < Heading as = "h3" >
193
216
< Translation id = "page-about-h3" />
194
- </ h3 >
195
- < p >
217
+ </ Heading >
218
+ < Text >
196
219
< Translation id = "page-about-p-5" /> { " " }
197
220
< Link to = "https://github.com/ethereum/ethereum-org-website/labels/Status%3A%20In%20Progress" >
198
221
< Translation id = "page-about-link-3" /> { " " }
199
222
</ Link >
200
223
.
201
- </ p >
224
+ </ Text >
202
225
< IssueSection issues = { issues . inProgress } />
203
- < h3 >
226
+ < Heading as = "h3" >
204
227
< Translation id = "page-about-h3-2" />
205
- </ h3 >
206
- < p >
228
+ </ Heading >
229
+ < Text >
207
230
< Translation id = "page-about-p-6" /> { " " }
208
231
< Link to = "https://github.com/ethereum/ethereum-org-website/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Up+Next%22" >
209
232
< Translation id = "page-about-link-3" />
210
233
</ Link >
211
234
.
212
- </ p >
235
+ </ Text >
213
236
< IssueSection issues = { issues . planned } />
214
- < h3 >
237
+ < Heading as = "h3" >
215
238
< Translation id = "page-about-h3-1" />
216
- </ h3 >
217
- < p >
239
+ </ Heading >
240
+ < Text >
218
241
< Translation id = "page-about-p-7" /> { " " }
219
242
< Link to = "https://github.com/ethereum/ethereum-org-website/issues?q=is%3Aissue+is%3Aclosed" >
220
243
< Translation id = "page-about-link-6" /> { " " }
221
244
</ Link >
222
245
.
223
- </ p >
246
+ </ Text >
224
247
< IssueSection issues = { issues . implemented } />
225
- < h2 >
248
+ < Heading as = "h2" >
226
249
< Translation id = "page-about-h2" />
227
- </ h2 >
228
- < p >
250
+ </ Heading >
251
+ < Text >
229
252
< Translation id = "page-about-p-8" />
230
- </ p >
231
- < ul >
232
- < li >
253
+ </ Text >
254
+ < UnorderedList >
255
+ < ListItem >
233
256
< Link to = "https://discord.gg/bTCfS8C" >
234
257
< Translation id = "page-about-link-4" />
235
258
</ Link >
236
- </ li >
237
- < li >
259
+ </ ListItem >
260
+ < ListItem >
238
261
< Link to = "https://github.com/ethereum/ethereum-org-website/issues/new/choose" >
239
262
< Translation id = "page-about-link-7" />
240
263
</ Link >
241
- </ li >
242
- < li >
264
+ </ ListItem >
265
+ < ListItem >
243
266
< Link to = "https://twitter.com/ethdotorg" >
244
267
< Translation id = "page-about-link-5" />
245
268
</ Link >
246
- </ li >
247
- </ ul >
248
- </ div >
269
+ </ ListItem >
270
+ </ UnorderedList >
271
+ </ Box >
249
272
)
250
273
}
251
274
0 commit comments