Skip to content

Commit c5bd76a

Browse files
committed
chore: update docs
1 parent b525e4b commit c5bd76a

File tree

13 files changed

+295
-436
lines changed

13 files changed

+295
-436
lines changed
Lines changed: 8 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,20 @@
1-
import { ExternalLinkIcon } from "lucide-react";
2-
import Link from "next/link";
3-
import type { ThirdwebClient } from "thirdweb";
1+
import { defineChain, type ThirdwebClient } from "thirdweb";
42
import type { ChainMetadata } from "thirdweb/chains";
5-
import { ChainIcon } from "../../../../components/server/chain-icon";
6-
import { PayModalButton } from "../client/PayModal";
7-
import { CreditCardIcon } from "../icons/CreditCardIcon";
83
import { SectionTitle } from "./SectionTitle";
4+
import { BuyWidget } from "thirdweb/react";
95

106
export function BuyFundsSection(props: {
117
chain: ChainMetadata;
128
client: ThirdwebClient;
139
}) {
14-
const sanitizedChainName = props.chain.name.replace("Mainnet", "").trim();
15-
1610
return (
17-
<section>
11+
<section className="flex flex-col gap-4 items-center justify-center">
1812
<SectionTitle title="Bridge" />
19-
<div className="flex justify-center rounded-lg border border-border bg-card px-4 py-10">
20-
<div className="flex max-w-[520px] flex-col items-center ">
21-
<div className="flex items-center">
22-
<ChainIcon
23-
className="-mr-2 size-12 rounded-full border p-1"
24-
iconUrl={props.chain.icon?.url}
25-
/>
26-
<CreditCardIcon
27-
bg="hsl(var(--background))"
28-
className="-ml-2 size-12"
29-
/>
30-
</div>
31-
32-
<div className="h-6" />
33-
34-
<h2 className="px-4 text-center font-semibold text-lg tracking-tight">
35-
Bridge Funds to {sanitizedChainName}
36-
</h2>
37-
38-
<div className="h-2" />
39-
40-
<p className="max-w-[520px] px-4 text-center text-muted-foreground text-sm">
41-
Get {props.chain.nativeCurrency.symbol} on {sanitizedChainName} with
42-
fiat or any token on another chain.
43-
</p>
44-
45-
<div className="h-8" />
46-
47-
<PayModalButton
48-
chainId={props.chain.chainId}
49-
client={props.client}
50-
label={`Bridge to ${sanitizedChainName}`}
51-
/>
52-
53-
<div className="h-4" />
54-
55-
<Link
56-
className="inline-flex items-center gap-1.5 text-muted-foreground text-sm hover:text-foreground"
57-
href="https://portal.thirdweb.com/connect/pay/overview"
58-
rel="noopener noreferrer"
59-
target="_blank"
60-
>
61-
Learn more about Universal Bridge
62-
<ExternalLinkIcon className="size-3" />
63-
</Link>
64-
</div>
65-
</div>
13+
<BuyWidget
14+
client={props.client}
15+
chain={defineChain(props.chain.chainId)}
16+
amount="0.01"
17+
/>
6618
</section>
6719
);
6820
}

0 commit comments

Comments
 (0)