1- import { StyledPayEmbed } from "@/components/styled-pay-embed" ;
21import { Button } from "@/components/ui/button" ;
32import { metadataBase } from "@/lib/constants" ;
43import type { Metadata } from "next" ;
4+ import Image from "next/image" ;
55import Link from "next/link" ;
6- import { CodeExample } from "../../../components/code/code-example " ;
7- import { StyledPayTransaction } from "../../../components/styled- pay- transaction" ;
6+ import { StyledPayEmbed } from "../../../components/pay/embed " ;
7+ import { PayTransactionButton } from "../../../components/pay/ transaction-button " ;
88
99export const metadata : Metadata = {
1010 metadataBase,
@@ -15,87 +15,51 @@ export const metadata: Metadata = {
1515
1616export default function Page ( ) {
1717 return (
18- < main className = "flex-1 content-center relative" >
19- < section className = "w-full py-12 md:py-24 lg:py-32 xl:py-48 z-10" >
20- < div className = "container px-4 md:px-6" >
21- < div className = "grid gap-10 lg:grid-cols-[1fr_400px] lg:gap-12 xl:grid-cols-[1fr_600px]" >
22- < div className = "flex flex-col justify-center space-y-4 min-h-[100%]" >
23- < div className = "space-y-2" >
24- < h1 className = "text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none font-inter mb-6 text-balance" >
25- The easiest way for users to transact in your app
26- </ h1 >
27- < p className = "max-w-[600px] text-gray-500 md:text-xl dark:text-gray-300 mb-6 font-inter" >
28- Onramp users in clicks with credit card & cross-chain
29- crypto payments — and generate revenue for each user
30- transaction. Integrate for free.
31- </ p >
32- </ div >
33- < div className = "flex flex-col gap-4 min-[400px]:flex-row" >
34- < Button asChild size = "lg" >
35- < Link
36- target = "_blank"
37- href = "https://portal.thirdweb.com/connect/pay/get-started"
38- >
39- View docs
40- </ Link >
41- </ Button >
42- < Button asChild variant = "outline" size = "lg" >
43- < Link target = "_blank" href = "https://thirdweb.com/contact-us" >
44- Book a Demo
45- </ Link >
46- </ Button >
47- </ div >
48- </ div >
49- < div className = "w-full mx-auto my-auto sm:w-full lg:order-last relative flex flex-col space-y-2" >
50- < div className = "shadow-xl md:w-[400px] md:mx-auto" >
51- < StyledPayEmbed />
52- </ div >
53- < p className = "md:text-xl text-center text-muted-foreground" >
54- < small > 👆 This is live, try it out! 👆</ small >
18+ < main className = "flex-1 content-center relative py-12 md:py-24 lg:py-32 xl:py-48 space-y-12 md:space-y-24" >
19+ < section className = "container px-4 md:px-6" >
20+ < div className = "grid gap-10 lg:grid-cols-[1fr_400px] lg:gap-12 xl:grid-cols-[1fr_600px]" >
21+ < div className = "flex flex-col justify-center space-y-4 min-h-[100%]" >
22+ < div className = "space-y-2" >
23+ < h1 className = "text-4xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none font-inter mb-6 text-balance" >
24+ The easiest way for users to transact in your app
25+ </ h1 >
26+ < p className = "max-w-[600px] text-gray-500 md:text-xl dark:text-gray-300 mb-6 font-inter" >
27+ Onramp users with credit card & cross-chain crypto payments
28+ — and generate revenue for each user transaction.
5529 </ p >
5630 </ div >
31+ < div className = "flex flex-col gap-4 min-[400px]:flex-row" >
32+ < Button asChild size = "lg" >
33+ < Link
34+ target = "_blank"
35+ href = "https://portal.thirdweb.com/connect/pay/get-started"
36+ >
37+ View docs
38+ </ Link >
39+ </ Button >
40+ < Button asChild variant = "outline" size = "lg" >
41+ < Link target = "_blank" href = "https://thirdweb.com/contact-us" >
42+ Book a Demo
43+ </ Link >
44+ </ Button >
45+ </ div >
46+ </ div >
47+ < div className = "w-full mx-auto my-auto sm:w-full order-first lg:order-last relative flex flex-col space-y-2" >
48+ < div className = "max-w-full sm:max-w-[600px]" >
49+ < Image
50+ src = { require ( "../../../../public/pay.png" ) }
51+ objectFit = { "contain" }
52+ alt = ""
53+ />
54+ </ div >
5755 </ div >
5856 </ div >
5957 </ section >
6058 < section className = "container px-4 md:px-6 space-y-8" >
61- < div className = "space-y-2" >
62- < h2 className = "text-4xl font-semibold tracking-tight" >
63- Transaction Button
64- </ h2 >
65- < p className = "max-w-[600px]" >
66- Transaction Button is a handy component that handles transactions.
67- < br />
68- If your user doesn't have enough funds for that transaction, a
69- pre-filled pay modal will appear with the exact amount needed.
70- </ p >
71- </ div >
72-
73- < CodeExample
74- preview = { < StyledPayTransaction /> }
75- code = { `import { TransactionButton } from "thirdweb/react";
76-
77-
78- function App() {
79- const account = useActiveAccount();
80-
81- return (
82- <TransactionButton
83- transaction={() => {
84- // any transaction works
85- return claimTo({
86- contract,
87- quantity: 1n,
88- tokenId: 0n,
89- to: account?.address,
90- });
91- }}
92- >
93- Buy for 10 MATIC
94- </TransactionButton>
95- );
96- };` }
97- lang = "tsx"
98- />
59+ < StyledPayEmbed />
60+ </ section >
61+ < section className = "container px-4 md:px-6 space-y-8" >
62+ < PayTransactionButton />
9963 </ section >
10064 </ main >
10165 ) ;
0 commit comments