1
+ import { HTMLAttributes } from "react"
1
2
import type { GetStaticProps } from "next/types"
2
3
import { useTranslation } from "next-i18next"
3
4
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
5
15
6
import type { BasePageProps , ChildOnlyProp , Lang } from "@/lib/types"
16
7
17
8
import AssetDownload from "@/components/AssetDownload"
18
9
import FeedbackCard from "@/components/FeedbackCard"
19
- import { Image } from "@/components/Image"
20
- import InlineLink from "@/components/Link"
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,34 +81,19 @@ 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 grid-cols-[repeat(auto-fit,minmax(min(288px,100%),1fr))]"
97
87
{ ...props }
98
88
/>
99
89
)
100
90
101
- const H2 = ( props : ChildOnlyProp & HeadingProps ) => (
102
- < Heading
103
- fontSize = { { base : "2xl" , md : "3xl" } }
104
- lineHeight = { 1.4 }
105
- mt = { 16 }
106
- mb = "6"
107
- scrollMarginTop = { 24 }
108
- { ...props }
109
- />
91
+ const H2 = ( props : HTMLAttributes < HTMLHeadingElement > ) => (
92
+ < h2 className = "mb-6 mt-16 scroll-mt-24 leading-xs" { ...props } />
110
93
)
111
94
112
95
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
- />
96
+ < h3 className = "mb-0 mt-10 leading-xs" { ...props } />
120
97
)
121
98
122
99
export const getStaticProps = ( async ( { locale } ) => {
@@ -146,24 +123,22 @@ const AssetsPage = () => {
146
123
ethDiamondPurple
147
124
)
148
125
return (
149
- < Flex direction = "column" width = " full">
126
+ < Flex className = "w- full flex-col ">
150
127
< PageMetadata
151
128
title = { t ( "page-assets-meta-title" ) }
152
129
description = { t ( "page-assets-meta-desc" ) }
153
130
/>
154
- < Box as = { MainArticle } py = "4" px = "8 ">
155
- < Flex direction = "column" px = "8" py = " 4">
131
+ < MainArticle className = "px-8 py-4 ">
132
+ < Flex className = "flex-col px-8 py- 4">
156
133
< Center >
157
- < Image
134
+ < TwImage
135
+ className = "w-20"
158
136
src = { assetPageHeroImage }
159
137
alt = { t ( "page-assets-eth-diamond-gray" ) }
160
- w = "5rem"
161
138
/>
162
139
</ Center >
163
140
< Center >
164
- < Heading as = "h1" size = "2xl" my = "8" >
165
- { t ( "page-assets-h1" ) }
166
- </ Heading >
141
+ < h1 className = "my-8" > { t ( "page-assets-h1" ) } </ h1 >
167
142
</ Center >
168
143
< Center >
169
144
< InlineLink href = "/assets/#illustrations" >
@@ -562,7 +537,7 @@ const AssetsPage = () => {
562
537
svgUrl = "/images/assets/svgs/merge-panda.svg"
563
538
/>
564
539
</ Row >
565
- </ Box >
540
+ </ MainArticle >
566
541
< FeedbackCard />
567
542
</ Flex >
568
543
)
0 commit comments