@@ -2,17 +2,11 @@ import { GetStaticProps } from "next"
2
2
import { useRouter } from "next/router"
3
3
import { useTranslation } from "next-i18next"
4
4
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
5
- import type { ComponentPropsWithRef } from "react"
6
- import {
7
- Box ,
8
- Flex ,
9
- type FlexProps ,
10
- Heading ,
11
- type HeadingProps ,
12
- List ,
13
- ListItem ,
14
- useToken ,
15
- } from "@chakra-ui/react"
5
+ import type {
6
+ ComponentProps ,
7
+ ComponentPropsWithRef ,
8
+ CSSProperties ,
9
+ } from "react"
16
10
17
11
import type { BasePageProps , ChildOnlyProp , Lang } from "@/lib/types"
18
12
@@ -24,67 +18,68 @@ import FeedbackCard from "@/components/FeedbackCard"
24
18
import InfoBanner from "@/components/InfoBanner"
25
19
import InlineLink from "@/components/Link"
26
20
import MainArticle from "@/components/MainArticle"
27
- import OldHeading from "@/components/OldHeading"
28
21
import Text from "@/components/OldText"
29
22
import PageHero , {
30
23
type ContentType as PageHeroContent ,
31
24
} from "@/components/PageHero"
32
25
import PageMetadata from "@/components/PageMetadata"
33
26
import Trilemma from "@/components/Trilemma"
34
27
import { Divider } from "@/components/ui/divider"
28
+ import { Flex , type FlexProps , VStack } from "@/components/ui/flex"
29
+ import { List , ListItem } from "@/components/ui/list"
35
30
31
+ import { cn } from "@/lib/utils/cn"
36
32
import { existsNamespace } from "@/lib/utils/existsNamespace"
37
33
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
34
+ import { screens } from "@/lib/utils/screen"
38
35
import { getLocaleTimestamp } from "@/lib/utils/time"
39
36
import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
40
37
41
38
import oldship from "@/public/images/upgrades/oldship.png"
42
39
43
40
const Page = ( props : ChildOnlyProp ) => (
44
- < Flex
45
- as = { MainArticle }
46
- direction = "column"
47
- align = "center"
48
- w = "full"
49
- { ...props }
50
- />
41
+ < VStack className = "w-full gap-0" { ...props } asChild >
42
+ < MainArticle { ...props } />
43
+ </ VStack >
51
44
)
52
45
53
46
const PageContent = ( props : ChildOnlyProp ) => (
54
- < Flex flexDirection = "column" gap = "8" py = { 4 } px = { 8 } w = "full " { ...props } />
47
+ < Flex className = "w-full flex-col gap-8 px-8 py-4 " { ...props } />
55
48
)
56
49
57
- const H2 = ( props : HeadingProps ) => (
58
- < Heading
59
- as = "h2"
60
- mb = { 8 }
61
- fontSize = { { base : "2xl" , md : "2rem" } }
62
- fontWeight = "semibold"
63
- lineHeight = { 1.4 }
50
+ const H2 = ( { className, ...props } : ComponentProps < "h2" > ) => (
51
+ < h2
52
+ className = { cn (
53
+ "mb-8 text-2xl font-semibold leading-[1.4] md:text-[2rem]" ,
54
+ className
55
+ ) }
64
56
{ ...props }
65
57
/>
66
58
)
67
59
68
- const CenterH2 = ( props : HeadingProps ) => < H2 textAlign = "center" { ...props } />
60
+ const CenterH2 = ( props : Omit < ComponentProps < "h2" > , "className" > ) => (
61
+ < H2 className = "text-center" { ...props } />
62
+ )
69
63
70
- const H3 = ( props : HeadingProps ) => (
71
- < OldHeading
72
- as = "h3"
73
- fontSize = { { base : "xl" , md : "2xl" } }
74
- fontWeight = "semibold"
75
- lineHeight = { 1.4 }
64
+ const H3 = ( props : Omit < ComponentProps < "h3" > , "className" > ) => (
65
+ < h3
66
+ className = "mb-8 mt-10 text-xl font-semibold leading-[1.4] md:text-2xl"
76
67
{ ...props }
77
68
/>
78
69
)
79
70
80
- const CardContainer = ( props : FlexProps ) => (
81
- < Flex wrap = "wrap" mx = { - 4 } { ...props } />
71
+ const CardContainer = ( { className , ... props } : FlexProps ) => (
72
+ < Flex className = { cn ( "-mx-4 flex-wrap" , className ) } { ...props } />
82
73
)
83
74
84
75
const ProblemCardContainer = ( props : ChildOnlyProp ) => {
85
- const containerMaxWidth = useToken ( "breakpoints" , [ "lg" ] )
86
-
87
- return < CardContainer maxW = { containerMaxWidth } m = "0 auto" { ...props } />
76
+ return (
77
+ < CardContainer
78
+ style = { { "--container-max-w" : screens . lg } as CSSProperties }
79
+ className = "mx-auto max-w-[var(--container-max-w)]"
80
+ { ...props }
81
+ />
82
+ )
88
83
}
89
84
90
85
const CentreCard = ( props : ComponentPropsWithRef < typeof Card > ) => (
@@ -95,11 +90,14 @@ const CentreCard = (props: ComponentPropsWithRef<typeof Card>) => (
95
90
)
96
91
97
92
const CentralContent = ( props : ChildOnlyProp ) => (
98
- < Box my = { 0 } mx = { { base : 0 , lg : 48 } } { ...props } />
93
+ < div className = " lg:mx-48" { ...props } />
99
94
)
100
95
101
96
const TrilemmaContent = ( props : ChildOnlyProp ) => (
102
- < Box w = "full" my = { 8 } mx = { 0 } p = { 8 } background = "cardGradient" { ...props } />
97
+ < div
98
+ className = "my-8 w-full bg-gradient-to-r from-accent-a/10 to-accent-c/10 p-8"
99
+ { ...props }
100
+ />
103
101
)
104
102
105
103
export const getStaticProps = ( async ( { locale } ) => {
@@ -162,7 +160,7 @@ const VisionPage = () => {
162
160
< Text > { t ( "page-roadmap-vision-upgrade-needs-desc" ) } </ Text >
163
161
< Text > { t ( "page-roadmap-vision-upgrade-needs-desc-2" ) } </ Text >
164
162
< Text > { t ( "page-roadmap-vision-upgrade-needs-desc-3" ) } </ Text >
165
- < List listStyleType = " disc">
163
+ < List className = "list- disc">
166
164
< ListItem >
167
165
< InlineLink href = "https://members.delphidigital.io/reports/the-hitchhikers-guide-to-ethereum" >
168
166
{ t ( "page-roadmap-vision-2022" ) }
0 commit comments