@@ -12,7 +12,7 @@ import DocLink from "@/components/DocLink"
12
12
import FeedbackCard from "@/components/FeedbackCard"
13
13
import { HubHero } from "@/components/Hero"
14
14
import type { HubHeroProps } from "@/components/Hero/HubHero"
15
- import { Image , type ImageProps } from "@/components/Image"
15
+ import { type ImageProps , TwImage } from "@/components/Image"
16
16
import LeftNavBar from "@/components/LeftNavBar"
17
17
import MainArticle from "@/components/MainArticle"
18
18
import { ContentContainer } from "@/components/MdComponents"
@@ -121,6 +121,10 @@ const H3 = ({ children, ...props }: HTMLAttributes<HTMLHeadingElement>) => (
121
121
</ h3 >
122
122
)
123
123
124
+ const ImageHeight200 = ( { src, alt } : ImageProps ) => (
125
+ < TwImage className = "h-[200px] w-auto" src = { src } alt = { alt } />
126
+ )
127
+
124
128
export const getStaticProps = ( async ( { locale } ) => {
125
129
const requiredNamespaces = getRequiredNamespacesForPage ( "/learn" )
126
130
@@ -197,11 +201,6 @@ const LearnPage = () => {
197
201
] ,
198
202
}
199
203
200
- const height200 : Partial < ImageProps > = {
201
- height : 200 ,
202
- style : { width : "auto" , objectFit : "cover" } ,
203
- }
204
-
205
204
return (
206
205
< div className = "relative w-full" >
207
206
< PageMetadata
@@ -236,10 +235,9 @@ const LearnPage = () => {
236
235
>
237
236
< >
238
237
< CardImage >
239
- < Image
238
+ < ImageHeight200
240
239
src = { whatIsEth }
241
240
alt = { t ( "what-is-ethereum-card-image-alt" ) }
242
- { ...height200 }
243
241
/>
244
242
</ CardImage >
245
243
< ButtonLink href = "/what-is-ethereum/" >
@@ -253,7 +251,7 @@ const LearnPage = () => {
253
251
>
254
252
< >
255
253
< CardImage >
256
- < Image src = { eth } alt = "" { ... height200 } />
254
+ < ImageHeight200 src = { eth } alt = "" />
257
255
</ CardImage >
258
256
< ButtonLink href = "/eth/" >
259
257
{ t ( "what-is-eth-card-title" ) }
@@ -266,7 +264,7 @@ const LearnPage = () => {
266
264
>
267
265
< >
268
266
< CardImage >
269
- < Image src = { impact } alt = "" { ... height200 } />
267
+ < ImageHeight200 src = { impact } alt = "" />
270
268
</ CardImage >
271
269
< ButtonLink href = "/web3/" >
272
270
{ t ( "what-is-web3-card-title" ) }
@@ -305,10 +303,9 @@ const LearnPage = () => {
305
303
>
306
304
< >
307
305
< CardImage >
308
- < Image
306
+ < ImageHeight200
309
307
src = { wallet }
310
308
alt = { t ( "what-is-a-wallet-card-alt" ) }
311
- { ...height200 }
312
309
/>
313
310
</ CardImage >
314
311
< ButtonLink href = "/wallets/" >
@@ -322,7 +319,7 @@ const LearnPage = () => {
322
319
>
323
320
< >
324
321
< CardImage >
325
- < Image src = { futureTransparent } alt = "" { ... height200 } />
322
+ < ImageHeight200 src = { futureTransparent } alt = "" />
326
323
</ CardImage >
327
324
< ButtonLink href = "/wallets/find-wallet/" >
328
325
{ t ( "find-a-wallet-button" ) }
@@ -335,7 +332,7 @@ const LearnPage = () => {
335
332
>
336
333
< >
337
334
< CardImage >
338
- < Image src = { Layer2LearnHero } alt = "" { ... height200 } />
335
+ < ImageHeight200 src = { Layer2LearnHero } alt = "" />
339
336
</ CardImage >
340
337
< ButtonLink href = "/layer-2/networks" >
341
338
{ t ( "ethereum-networks-card-button" ) }
@@ -359,7 +356,7 @@ const LearnPage = () => {
359
356
</ UnorderedList >
360
357
</ Stack >
361
358
< div className = "self-end" >
362
- < Image src = { newRings } alt = "" maxW = { 265 } />
359
+ < TwImage className = "max-w-[265px]" src = { newRings } alt = "" />
363
360
</ div >
364
361
</ Flex >
365
362
@@ -394,7 +391,7 @@ const LearnPage = () => {
394
391
>
395
392
< >
396
393
< CardImage >
397
- < Image src = { financeTransparent } alt = "" { ... height200 } />
394
+ < ImageHeight200 src = { financeTransparent } alt = "" />
398
395
</ CardImage >
399
396
< ButtonLink href = "/defi/" >
400
397
{ t ( "defi-card-button" ) }
@@ -407,7 +404,7 @@ const LearnPage = () => {
407
404
>
408
405
< >
409
406
< CardImage >
410
- < Image src = { stablecoins } alt = "" { ... height200 } />
407
+ < ImageHeight200 src = { stablecoins } alt = "" />
411
408
</ CardImage >
412
409
< ButtonLink href = "/stablecoins/" >
413
410
{ t ( "stablecoins-card-button" ) }
@@ -420,11 +417,7 @@ const LearnPage = () => {
420
417
>
421
418
< >
422
419
< CardImage >
423
- < Image
424
- src = { infrastructureTransparent }
425
- alt = ""
426
- { ...height200 }
427
- />
420
+ < ImageHeight200 src = { infrastructureTransparent } alt = "" />
428
421
</ CardImage >
429
422
< ButtonLink href = "/nft/" > { t ( "nft-card-button" ) } </ ButtonLink >
430
423
</ >
@@ -435,7 +428,7 @@ const LearnPage = () => {
435
428
>
436
429
< >
437
430
< CardImage >
438
- < Image src = { dao } alt = "" { ... height200 } />
431
+ < ImageHeight200 src = { dao } alt = "" />
439
432
</ CardImage >
440
433
< ButtonLink href = "/dao/" > { t ( "dao-card-button" ) } </ ButtonLink >
441
434
</ >
@@ -446,7 +439,7 @@ const LearnPage = () => {
446
439
>
447
440
< >
448
441
< CardImage >
449
- < Image src = { developersEthBlocks } alt = "" { ... height200 } />
442
+ < ImageHeight200 src = { developersEthBlocks } alt = "" />
450
443
</ CardImage >
451
444
< ButtonLink href = "/dapps/" >
452
445
{ t ( "dapp-card-button" ) }
@@ -509,7 +502,7 @@ const LearnPage = () => {
509
502
>
510
503
< >
511
504
< CardImage >
512
- < Image src = { rhino } alt = "" { ... height200 } />
505
+ < ImageHeight200 src = { rhino } alt = "" />
513
506
</ CardImage >
514
507
< ButtonLink href = "/staking/" >
515
508
{ t ( "staking-ethereum-card-button" ) }
@@ -522,7 +515,7 @@ const LearnPage = () => {
522
515
>
523
516
< >
524
517
< CardImage >
525
- < Image src = { ethereumInside } alt = "" { ... height200 } />
518
+ < ImageHeight200 src = { ethereumInside } alt = "" />
526
519
</ CardImage >
527
520
< ButtonLink href = "/run-a-node/" >
528
521
{ t ( "run-a-node-card-title" ) }
@@ -544,7 +537,7 @@ const LearnPage = () => {
544
537
>
545
538
< >
546
539
< CardImage >
547
- < Image src = { hackathon } alt = "" { ... height200 } />
540
+ < ImageHeight200 src = { hackathon } alt = "" />
548
541
</ CardImage >
549
542
< ButtonLink href = "/energy-consumption/" >
550
543
{ t ( "energy-consumption-card-button" ) }
@@ -557,7 +550,7 @@ const LearnPage = () => {
557
550
>
558
551
< >
559
552
< CardImage >
560
- < Image src = { merge } alt = "" { ... height200 } />
553
+ < ImageHeight200 src = { merge } alt = "" />
561
554
</ CardImage >
562
555
< ButtonLink href = "/roadmap/" >
563
556
{ t ( "ethereum-upgrades-card-button" ) }
@@ -570,7 +563,7 @@ const LearnPage = () => {
570
563
>
571
564
< >
572
565
< CardImage >
573
- < Image src = { financeTransparent } alt = "" { ... height200 } />
566
+ < ImageHeight200 src = { financeTransparent } alt = "" />
574
567
</ CardImage >
575
568
< ButtonLink href = "/whitepaper/" >
576
569
{ t ( "ethereum-whitepaper-card-button" ) }
@@ -616,10 +609,9 @@ const LearnPage = () => {
616
609
>
617
610
< >
618
611
< CardImage >
619
- < Image
612
+ < ImageHeight200
620
613
src = { enterprise }
621
614
alt = { t ( "community-hub-card-alt" ) }
622
- { ...height200 }
623
615
/>
624
616
</ CardImage >
625
617
< ButtonLink href = "/community/" >
@@ -633,7 +625,7 @@ const LearnPage = () => {
633
625
>
634
626
< >
635
627
< CardImage >
636
- < Image src = { dogeComputer } alt = "" { ... height200 } />
628
+ < ImageHeight200 src = { dogeComputer } alt = "" />
637
629
</ CardImage >
638
630
< ButtonLink href = "/community/get-involved/" >
639
631
{ t ( "get-involved-card-title" ) }
@@ -646,7 +638,7 @@ const LearnPage = () => {
646
638
>
647
639
< >
648
640
< CardImage >
649
- < Image src = { impact } alt = "" { ... height200 } />
641
+ < ImageHeight200 src = { impact } alt = "" />
650
642
</ CardImage >
651
643
< ButtonLink href = "/community/online/" >
652
644
{ t ( "online-communities-card-button" ) }
0 commit comments