Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db145b5

Browse files
committed
[BLD-330] Playground: Add missing payments overview page (#8107)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces a new `OverviewPage` component for the payments section, updates the layout of the `OverviewPage`, and adds a new payment feature card for the x402 payment protocol. ### Detailed summary - Updated `OverviewPage` to allow a maximum width of 80% for the description. - Created a new `Page` component in `page.tsx` that utilizes `OverviewPage` with a title, description, and feature cards. - Added a new feature card for the x402 payment protocol in `pages-metadata.ts`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced a Payments page with a clear overview, icon, and quick links to payment options. * Added an x402 payment protocol card to the Payments overview, enabling API payments with any web3 wallet and direct navigation. * **Style** * Refined overview layout by limiting description width for improved readability on wide screens. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent db38380 commit db145b5

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

apps/playground-web/src/app/data/pages-metadata.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
BotIcon,
55
BoxIcon,
66
BringToFrontIcon,
7+
CircleDollarSignIcon,
78
CircleUserIcon,
89
CreditCardIcon,
910
DollarSignIcon,
@@ -186,6 +187,13 @@ export const paymentsFeatureCards: FeatureCardMetadata[] = [
186187
description:
187188
"Enable users to pay for onchain transactions with fiat or crypto",
188189
},
190+
{
191+
icon: CircleDollarSignIcon,
192+
title: "x402",
193+
link: "/payments/x402",
194+
description:
195+
"Use the x402 payment protocol to pay for API calls using any web3 wallet",
196+
},
189197
];
190198

191199
export const accountAbstractionsFeatureCards: FeatureCardMetadata[] = [
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { OverviewPage } from "@/components/blocks/OverviewPage";
2+
import { PayIcon } from "@/icons/PayIcon";
3+
import { paymentsFeatureCards } from "../data/pages-metadata";
4+
5+
export default function Page() {
6+
return (
7+
<OverviewPage
8+
title="Payments"
9+
description="thirdweb Payments allow developers to create advanced payment flows to monetize their apps through product sales, peer to peer payments, token sales, and more"
10+
featureCards={paymentsFeatureCards}
11+
icon={PayIcon}
12+
/>
13+
);
14+
}

apps/playground-web/src/components/blocks/OverviewPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function OverviewPage(props: {
1919
<h1 className="mb-2 font-bold text-5xl tracking-tight">
2020
{props.title}
2121
</h1>
22-
<p className="text-base text-muted-foreground leading-normal text-pretty">
22+
<p className="text-base text-muted-foreground leading-normal text-pretty max-w-[80%]">
2323
{props.description}
2424
</p>
2525
</div>

0 commit comments

Comments
 (0)