1
- import React , { useEffect , useMemo , useState } from "react"
1
+ import { useEffect , useMemo , useState } from "react"
2
2
import { AnimatePresence , motion } from "framer-motion"
3
3
import {
4
4
RiAuctionLine ,
5
5
RiFileTransferLine ,
6
6
RiPriceTag2Line ,
7
7
} from "react-icons/ri"
8
- import { Box , Button , Flex , Icon , Text } from "@chakra-ui/react"
9
8
10
9
import type { PhoneScreenProps } from "@/lib/types"
11
10
12
- import { Image } from "@/components/Image"
11
+ import { TwImage as Image } from "@/components/Image"
12
+ import { Button } from "@/components/ui/buttons/Button"
13
+ import { Flex } from "@/components/ui/flex"
13
14
14
15
import { useEthPrice } from "../../../../hooks/useEthPrice"
15
16
import {
@@ -80,36 +81,17 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
80
81
{ [ 0 ] . includes ( step ) && < Browser /> }
81
82
{ [ 1 , 2 , 3 ] . includes ( step ) && (
82
83
< Web3App displayUrl = { EXAMPLE_APP_URL } >
83
- < Flex
84
- px = { 6 }
85
- py = { { base : 8 , md : 16 } }
86
- gap = { { base : 8 , md : 16 } }
87
- bg = "background.highlight"
88
- h = "full"
89
- direction = "column"
90
- textAlign = "center"
91
- >
92
- < Text
93
- as = { motion . p }
94
- fontSize = { { base : "xl" , md : "2xl" } }
95
- m = { 0 }
84
+ < Flex className = "bg-background.highlight h-full flex-col gap-8 px-6 py-8 text-center md:gap-16 md:py-16" >
85
+ < motion . p
86
+ className = "text-xl leading-[1.4] duration-700 md:text-2xl"
96
87
{ ...fadeInProps }
97
- transitionDuration = "0.75s"
98
- lineHeight = { 1.4 }
99
88
>
100
89
Welcome to Web3
101
- < Text as = "span" display = "block" mt = { 2 } fontWeight = "bold" >
102
- NFT Marketplace
103
- </ Text >
104
- </ Text >
105
- < Text
106
- as = { motion . p }
107
- { ...fadeInProps }
108
- transitionDuration = "0.75s"
109
- transitionDelay = "0.5s"
110
- >
90
+ < span className = "mt-2 block font-bold" > NFT Marketplace</ span >
91
+ </ motion . p >
92
+ < motion . p className = "delay-500 duration-700" { ...fadeInProps } >
111
93
Connect your wallet to view your collection
112
- </ Text >
94
+ </ motion . p >
113
95
</ Flex >
114
96
</ Web3App >
115
97
) }
@@ -132,16 +114,9 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
132
114
appName = "NFT Marketplace"
133
115
displayUrl = "app.example.com"
134
116
>
135
- < Box
136
- px = { 6 }
137
- py = { { base : 2 , md : 6 } }
138
- fontSize = "lg"
139
- sx = { { button : { textDecoration : "none" } } }
140
- >
141
- < Text fontWeight = "bold" mb = { 4 } >
142
- Your collection (1)
143
- </ Text >
144
- < Flex gap = { 2 } mb = { 6 } >
117
+ < div className = "px-6 py-2 text-lg md:py-6 [&_button]:no-underline" >
118
+ < p className = "mb-4 font-bold" > Your collection (1)</ p >
119
+ < Flex className = "mb-6 gap-2" >
145
120
< Image
146
121
src = { NFTs [ 0 ] . image }
147
122
width = { 120 }
@@ -153,35 +128,18 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
153
128
content = "These are some things you could do as the owner of your NFTs"
154
129
side = "top"
155
130
>
156
- < Flex
157
- direction = "column"
158
- fontSize = { { base : "xs" , sm : "sm" } }
159
- textAlign = "start"
160
- alignItems = "start"
161
- gap = { 1 }
162
- >
163
- < Text fontWeight = "bold" fontSize = "md" mb = "auto" ms = { 2 } >
164
- Cool art
165
- </ Text >
166
- < Button
167
- variant = "link"
168
- isDisabled
169
- leftIcon = { < Icon as = { RiAuctionLine } fontSize = "xs" /> }
170
- >
131
+ < Flex className = "flex-col items-start gap-1 text-start text-xs sm:text-sm" >
132
+ < p className = "mb-auto ms-2 text-md font-bold" > Cool art</ p >
133
+ < Button variant = "link" disabled >
134
+ < RiAuctionLine className = "text-xs" />
171
135
Set a price
172
136
</ Button >
173
- < Button
174
- variant = "link"
175
- isDisabled
176
- leftIcon = { < Icon as = { RiPriceTag2Line } fontSize = "xs" /> }
177
- >
137
+ < Button variant = "link" disabled >
138
+ < RiPriceTag2Line className = "text-xs" />
178
139
Auction item
179
140
</ Button >
180
- < Button
181
- variant = "link"
182
- isDisabled
183
- leftIcon = { < Icon as = { RiFileTransferLine } fontSize = "xs" /> }
184
- >
141
+ < Button variant = "link" disabled >
142
+ < RiFileTransferLine className = "text-xs" />
185
143
Transfer item
186
144
</ Button >
187
145
</ Flex >
@@ -192,16 +150,16 @@ export const ConnectWeb3 = ({ nav, ctaLabel }: PhoneScreenProps) => {
192
150
content = "Try out a real Ethereum application when finished here"
193
151
side = "top"
194
152
>
195
- < Box fontSize = { { base : "sm" , md : " md" } } >
196
- < Button variant = "link" isDisabled display = "block" >
153
+ < div className = "text-sm md:text- md">
154
+ < Button className = "block" variant = "link" disabled >
197
155
Browse other artwork
198
156
</ Button >
199
- < Button variant = "link" isDisabled >
157
+ < Button variant = "link" disabled >
200
158
Mint new NFT
201
159
</ Button >
202
- </ Box >
160
+ </ div >
203
161
</ NotificationPopover >
204
- </ Box >
162
+ </ div >
205
163
</ Web3App >
206
164
</ motion . div >
207
165
) }
0 commit comments