@@ -117,6 +117,11 @@ export const getStaticProps = (async ({ locale }) => {
117
117
} ) satisfies GetStaticProps < BasePageProps >
118
118
119
119
const AssetsPage = ( ) => {
120
+ // Ignore locale in the URL for SVG path in public directory to fix broken link
121
+ // SVG path changes from /en/images => /images
122
+ const svgPathFromOrigin =
123
+ typeof window !== `undefined` ? window . location . origin : ""
124
+
120
125
const { t } = useTranslation ( "page-assets" )
121
126
const assetPageHeroImage = useColorModeValue (
122
127
ethDiamondBlack ,
@@ -364,73 +369,73 @@ const AssetsPage = () => {
364
369
title = { t ( "page-assets-eth-diamond-glyph" ) }
365
370
alt = { t ( "page-assets-eth-diamond-glyph" ) }
366
371
image = { ethDiamondGlyph }
367
- svgUrl = " /images/assets/svgs/eth-diamond-glyph.svg"
372
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-glyph.svg` }
368
373
/>
369
374
< AssetDownload
370
375
title = { t ( "page-assets-eth-diamond-gray" ) }
371
376
alt = { t ( "page-assets-eth-diamond-gray" ) }
372
377
image = { ethDiamondBlack }
373
- svgUrl = " /images/assets/svgs/eth-diamond-black.svg"
378
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-black.svg` }
374
379
/>
375
380
< AssetDownload
376
381
title = { t ( "page-assets-eth-diamond-color" ) }
377
382
alt = { t ( "page-assets-eth-diamond-color" ) }
378
383
image = { ethDiamondColor }
379
- svgUrl = " /images/assets/svgs/eth-diamond-rainbow.svg"
384
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-rainbow.svg` }
380
385
/>
381
386
</ Row >
382
387
< Row >
383
388
< AssetDownload
384
389
title = { t ( "page-assets-eth-diamond-purple" ) }
385
390
alt = { t ( "page-assets-eth-diamond-purple" ) }
386
391
image = { ethDiamondPurple }
387
- svgUrl = " /images/assets/svgs/eth-diamond-purple.svg"
392
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-purple.svg` }
388
393
/>
389
394
< AssetDownload
390
395
title = { t ( "page-assets-eth-diamond-colored" ) }
391
396
alt = { t ( "page-assets-eth-diamond-colored" ) }
392
397
image = { ethGlyphColored }
393
- svgUrl = " /images/assets/svgs/eth-glyph-colored.svg"
398
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-glyph-colored.svg` }
394
399
/>
395
400
</ Row >
396
401
< Row >
397
402
< AssetDownload
398
403
title = { t ( "page-assets-eth-logo-portrait-gray" ) }
399
404
alt = { t ( "page-assets-eth-logo-portrait-gray" ) }
400
405
image = { ethPortraitBlack }
401
- svgUrl = " /images/assets/svgs/ethereum-logo-portrait-black.svg "
406
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-portrait-black.svg ` }
402
407
/>
403
408
< AssetDownload
404
409
title = { t ( "page-assets-eth-logo-landscape-gray" ) }
405
410
alt = { t ( "page-assets-eth-logo-landscape-gray" ) }
406
411
image = { ethLandscapeBlack }
407
- svgUrl = " /images/assets/svgs/ethereum-logo-landscape-black.svg"
412
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-landscape-black.svg` }
408
413
/>
409
414
< AssetDownload
410
415
title = { t ( "page-assets-eth-wordmark-gray" ) }
411
416
alt = { t ( "page-assets-eth-wordmark-gray" ) }
412
417
image = { ethWordmarkBlack }
413
- svgUrl = " /images/assets/svgs/ethereum-wordmark-black.svg"
418
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-wordmark-black.svg` }
414
419
/>
415
420
</ Row >
416
421
< Row >
417
422
< AssetDownload
418
423
title = { t ( "page-assets-eth-logo-portrait-purple" ) }
419
424
alt = { t ( "page-assets-eth-logo-portrait-purple" ) }
420
425
image = { ethPortraitPurple }
421
- svgUrl = " /images/assets/svgs/ethereum-logo-portrait-purple.svg"
426
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-portrait-purple.svg` }
422
427
/>
423
428
< AssetDownload
424
429
title = { t ( "page-assets-eth-logo-landscape-purple" ) }
425
430
alt = { t ( "page-assets-eth-logo-landscape-purple" ) }
426
431
image = { ethLandscapePurple }
427
- svgUrl = " /images/assets/svgs/ethereum-logo-landscape-purple.svg"
432
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-landscape-purple.svg` }
428
433
/>
429
434
< AssetDownload
430
435
title = { t ( "page-assets-eth-wordmark-purple" ) }
431
436
alt = { t ( "page-assets-eth-wordmark-purple" ) }
432
437
image = { ethWordmarkPurple }
433
- svgUrl = " /images/assets/svgs/ethereum-wordmark-purple-purple.svg"
438
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-wordmark-purple-purple.svg` }
434
439
/>
435
440
</ Row >
436
441
< H3 > { t ( "page-assets-page-assets-solid-background" ) } </ H3 >
@@ -439,19 +444,19 @@ const AssetsPage = () => {
439
444
title = { t ( "page-assets-eth-diamond-white" ) }
440
445
alt = { t ( "page-assets-eth-diamond-white" ) }
441
446
image = { ethDiamondBlackWhite }
442
- svgUrl = " /images/assets/svgs/eth-diamond-black-white.svg"
447
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-black-white.svg` }
443
448
/>
444
449
< AssetDownload
445
450
title = { t ( "page-assets-eth-diamond-gray" ) }
446
451
alt = { t ( "page-assets-eth-diamond-gray" ) }
447
452
image = { ethDiamondBlackGray }
448
- svgUrl = " /images/assets/svgs/eth-diamond-black-gray.svg"
453
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-black-gray.svg` }
449
454
/>
450
455
< AssetDownload
451
456
title = { t ( "page-assets-eth-diamond-purple" ) }
452
457
alt = { t ( "page-assets-eth-diamond-purple" ) }
453
458
image = { ethDiamondPurplePurple }
454
- svgUrl = " /images/assets/svgs/eth-diamond-purple-purple.svg"
459
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-purple-purple.svg` }
455
460
/>
456
461
</ Row >
457
462
@@ -460,67 +465,67 @@ const AssetsPage = () => {
460
465
title = { t ( "page-assets-eth-diamond-white" ) }
461
466
alt = { t ( "page-assets-eth-diamond-white" ) }
462
467
image = { ethDiamondPurpleWhite }
463
- svgUrl = " /images/assets/svgs/eth-diamond-purple-white.svg"
468
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-purple-white.svg` }
464
469
/>
465
470
< AssetDownload
466
471
title = { t ( "page-assets-eth-diamond-white" ) }
467
472
alt = { t ( "page-assets-eth-diamond-white" ) }
468
473
image = { ethDiamondPurpleWhite }
469
- svgUrl = " /images/assets/svgs/eth-diamond-purple-white.svg"
474
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/eth-diamond-purple-white.svg` }
470
475
/>
471
476
</ Row >
472
477
< Row >
473
478
< AssetDownload
474
479
title = { t ( "page-assets-eth-logo-portrait-gray" ) }
475
480
alt = { t ( "page-assets-eth-logo-portrait-gray" ) }
476
481
image = { ethPortraitBlackGray }
477
- svgUrl = " /images/assets/svgs/ethereum-logo-portrait-black-gray.svg"
482
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-portrait-black-gray.svg` }
478
483
/>
479
484
< AssetDownload
480
485
title = { t ( "page-assets-eth-logo-landscape-gray" ) }
481
486
alt = { t ( "page-assets-eth-logo-landscape-gray" ) }
482
487
image = { ethLandscapeBlackGray }
483
- svgUrl = " /images/assets/svgs/ethereum-logo-landscape-black-gray.svg"
488
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-landscape-black-gray.svg` }
484
489
/>
485
490
< AssetDownload
486
491
title = { t ( "page-assets-eth-wordmark-gray" ) }
487
492
alt = { t ( "page-assets-eth-wordmark-gray" ) }
488
493
image = { ethWordmarkBlackGray }
489
- svgUrl = " /images/assets/svgs/ethereum-wordmark-black-gray.svg"
494
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-wordmark-black-gray.svg` }
490
495
/>
491
496
</ Row >
492
497
< Row >
493
498
< AssetDownload
494
499
title = { t ( "page-assets-eth-logo-portrait-purple" ) }
495
500
alt = { t ( "page-assets-eth-logo-portrait-purple" ) }
496
501
image = { ethPortraitPurplePurple }
497
- svgUrl = " /images/assets/svgs/ethereum-logo-portrait-purple-purple.svg"
502
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-portrait-purple-purple.svg` }
498
503
/>
499
504
< AssetDownload
500
505
title = { t ( "page-assets-eth-logo-landscape-purple" ) }
501
506
alt = { t ( "page-assets-eth-logo-landscape-purple" ) }
502
507
image = { ethLandscapePurplePurple }
503
- svgUrl = " /images/assets/svgs/ethereum-logo-landscape-purple-purple.svg"
508
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-landscape-purple-purple.svg` }
504
509
/>
505
510
< AssetDownload
506
511
title = { t ( "page-assets-eth-wordmark-purple" ) }
507
512
alt = { t ( "page-assets-eth-wordmark-purple" ) }
508
513
image = { ethWordmarkPurplePurple }
509
- svgUrl = " /images/assets/svgs/ethereum-wordmark-purple-purple.svg"
514
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-wordmark-purple-purple.svg` }
510
515
/>
511
516
</ Row >
512
517
< Row >
513
518
< AssetDownload
514
519
title = { t ( "page-assets-eth-logo-landscape-white" ) }
515
520
alt = { t ( "page-assets-eth-logo-landscape-white" ) }
516
521
image = { ethLandscapePurpleWhite }
517
- svgUrl = " /images/assets/svgs/ethereum-logo-landscape-purple-white.svg"
522
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-logo-landscape-purple-white.svg` }
518
523
/>
519
524
< AssetDownload
520
525
title = { t ( "page-assets-eth-wordmark-white" ) }
521
526
alt = { t ( "page-assets-eth-wordmark-white" ) }
522
527
image = { ethWordmarkPurpleWhite }
523
- svgUrl = " /images/assets/svgs/ethereum-wordmark-purple-white.svg"
528
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/ethereum-wordmark-purple-white.svg` }
524
529
/>
525
530
</ Row >
526
531
< H2 id = "historical-illustrations" > { t ( "page-assets-illustrations" ) } </ H2 >
@@ -534,7 +539,7 @@ const AssetsPage = () => {
534
539
title = { t ( "page-assets-merge-panda" ) }
535
540
alt = { t ( "page-assets-merge-panda" ) }
536
541
image = { mergePanda }
537
- svgUrl = " /images/assets/svgs/merge-panda.svg"
542
+ svgUrl = { ` ${ svgPathFromOrigin } /images/assets/svgs/merge-panda.svg` }
538
543
/>
539
544
</ Row >
540
545
</ MainArticle >
0 commit comments