1
1
import type { GetStaticProps } from "next/types"
2
2
import { useTranslation } from "next-i18next"
3
3
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
4
- import {
5
- Box ,
6
- Center ,
7
- Flex ,
8
- Heading ,
9
- type HeadingProps ,
10
- SimpleGrid ,
11
- type SimpleGridProps ,
12
- useColorModeValue ,
13
- } from "@chakra-ui/react"
14
4
15
5
import type { BasePageProps , ChildOnlyProp , Lang } from "@/lib/types"
16
6
17
7
import AssetDownload from "@/components/AssetDownload"
18
8
import FeedbackCard from "@/components/FeedbackCard"
19
- import { Image } from "@/components/Image "
20
- import InlineLink from "@/components/Link "
9
+ import Heading from "@/components/Heading "
10
+ import { TwImage } from "@/components/Image "
21
11
import MainArticle from "@/components/MainArticle"
22
- import OldHeading from "@/components/OldHeading"
23
12
import PageMetadata from "@/components/PageMetadata"
13
+ import { Center , Flex } from "@/components/ui/flex"
14
+ import InlineLink from "@/components/ui/Link"
24
15
25
16
import { existsNamespace } from "@/lib/utils/existsNamespace"
26
17
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
@@ -37,6 +28,7 @@ import { getLocaleTimestamp } from "@/lib/utils/time"
37
28
// import leslieTheRhino from "@/public/images/upgrades/upgrade_rhino.png"
38
29
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
39
30
31
+ import useColorModeValue from "@/hooks/useColorModeValue"
40
32
import ethDiamondBlack from "@/public/images/assets/eth-diamond-black.png"
41
33
import ethDiamondBlackGray from "@/public/images/assets/eth-diamond-black-gray.png"
42
34
import ethDiamondBlackWhite from "@/public/images/assets/eth-diamond-black-white.jpg"
@@ -89,16 +81,17 @@ import defi from "@/public/images/use-cases/defi.png"
89
81
import wallet from "@/public/images/wallet.png"
90
82
import whatIsEthereum from "@/public/images/what-is-ethereum.png"
91
83
92
- const Row = ( props : SimpleGridProps ) => (
93
- < SimpleGrid
94
- templateColumns = "repeat(auto-fit, minmax(min(288px, 100%), 1fr))"
95
- mx = { - 4 }
96
- mb = "8"
84
+ const Row = ( props : ChildOnlyProp ) => (
85
+ < div
86
+ className = "-mx-4 mb-8 grid"
87
+ style = { {
88
+ gridTemplateColumns : "repeat(auto-fit, minmax(min(288px, 100%), 1fr))" ,
89
+ } }
97
90
{ ...props }
98
91
/>
99
92
)
100
93
101
- const H2 = ( props : ChildOnlyProp & HeadingProps ) => (
94
+ const H2 = ( props : ChildOnlyProp ) => (
102
95
< Heading
103
96
fontSize = { { base : "2xl" , md : "3xl" } }
104
97
lineHeight = { 1.4 }
@@ -110,13 +103,7 @@ const H2 = (props: ChildOnlyProp & HeadingProps) => (
110
103
)
111
104
112
105
const H3 = ( props : ChildOnlyProp ) => (
113
- < OldHeading
114
- as = "h3"
115
- fontSize = { { base : "xl" , md : "2xl" } }
116
- lineHeight = { 1.4 }
117
- mb = "0"
118
- { ...props }
119
- />
106
+ < h3 className = "mb-0 mt-10 leading-xs" { ...props } />
120
107
)
121
108
122
109
export const getStaticProps = ( async ( { locale } ) => {
@@ -146,18 +133,18 @@ const AssetsPage = () => {
146
133
ethDiamondPurple
147
134
)
148
135
return (
149
- < Flex direction = "column" width = " full">
136
+ < Flex className = "w- full flex-col ">
150
137
< PageMetadata
151
138
title = { t ( "page-assets-meta-title" ) }
152
139
description = { t ( "page-assets-meta-desc" ) }
153
140
/>
154
- < Box as = { MainArticle } py = "4" px = "8 ">
155
- < Flex direction = "column" px = "8" py = " 4">
141
+ < MainArticle className = "px-8 py-4 ">
142
+ < Flex className = "flex-col px-8 py- 4">
156
143
< Center >
157
- < Image
144
+ < TwImage
145
+ className = "w-20"
158
146
src = { assetPageHeroImage }
159
147
alt = { t ( "page-assets-eth-diamond-gray" ) }
160
- w = "5rem"
161
148
/>
162
149
</ Center >
163
150
< Center >
@@ -182,7 +169,7 @@ const AssetsPage = () => {
182
169
</ Center >
183
170
</ Flex >
184
171
185
- < H2 id = "illustrations" > { t ( "page-assets-illustrations" ) } </ H2 >
172
+ < H2 > { t ( "page-assets-illustrations" ) } </ H2 >
186
173
187
174
< Row >
188
175
< AssetDownload
@@ -381,8 +368,8 @@ const AssetsPage = () => {
381
368
artistUrl = "https://www.patrickatkins.co.uk/"
382
369
/>
383
370
</ Row >
384
- < H2 id = "historical" > { t ( "page-assets-historical-artwork" ) } </ H2 >
385
- < H2 id = "brand" > { t ( "page-assets-ethereum-brand-assets" ) } </ H2 >
371
+ < H2 > { t ( "page-assets-historical-artwork" ) } </ H2 >
372
+ < H2 > { t ( "page-assets-ethereum-brand-assets" ) } </ H2 >
386
373
< H3 > { t ( "page-assets-page-assets-transparent-background" ) } </ H3 >
387
374
< Row >
388
375
< AssetDownload
@@ -548,7 +535,7 @@ const AssetsPage = () => {
548
535
svgUrl = "/images/assets/svgs/ethereum-wordmark-purple-white.svg"
549
536
/>
550
537
</ Row >
551
- < H2 id = "historical-illustrations" > { t ( "page-assets-illustrations" ) } </ H2 >
538
+ < H2 > { t ( "page-assets-illustrations" ) } </ H2 >
552
539
< Row >
553
540
< AssetDownload
554
541
title = { t ( "page-assets-hero-panda" ) }
@@ -562,7 +549,7 @@ const AssetsPage = () => {
562
549
svgUrl = "/images/assets/svgs/merge-panda.svg"
563
550
/>
564
551
</ Row >
565
- </ Box >
552
+ </ MainArticle >
566
553
< FeedbackCard />
567
554
</ Flex >
568
555
)
0 commit comments