Skip to content

Commit bfdac10

Browse files
committed
[Docs] UB Migration & Other Small Things (#7075)
CORE-0000 <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on restructuring the `pay` section of the portal by updating links, modifying sidebar navigation, and adding new assets and pages to improve the user experience and documentation clarity. ### Detailed summary - Added new links to the `links` array for `Bridge`. - Updated `href` values in `apisLinks` for the Insight API. - Modified `FooterLinkItem` labels for consistency. - Created and adjusted multiple `.mdx` pages for the `pay` section. - Introduced `payRedirects` for improved navigation. - Updated the sidebar structure for the `pay` section, including new links and icons. - Added new layout and metadata to `layout.tsx` for better documentation presentation. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 64964da commit bfdac10

File tree

34 files changed

+195
-112
lines changed

34 files changed

+195
-112
lines changed

apps/portal/redirects.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,27 @@ const v4ToV5Redirects = {
10461046
"/references/wallets/:path*": "/typescript/v5/supported-wallets",
10471047
};
10481048

1049+
const payRedirects = {
1050+
"/connect/pay/overview": "/pay",
1051+
"/connect/pay/onramp-providers": "/pay/onramp-providers",
1052+
"/connect/pay/fees": "/pay/fees",
1053+
"/connect/pay/get-started": "/pay/get-started",
1054+
"/connect/pay/guides/accept-direct-payments":
1055+
"/pay/guides/accept-direct-payments",
1056+
"/connect/pay/guides/build-a-custom-experience":
1057+
"/pay/guides/build-a-custom-experience",
1058+
"/connect/pay/guides/cross-chain-swapping":
1059+
"/pay/guides/cross-chain-swapping",
1060+
"/connect/pay/customization/connectbutton":
1061+
"/pay/customization/connectbutton",
1062+
"/connect/pay/customization/payembed": "/pay/customization/payembed",
1063+
"/connect/pay/customization/send-transaction":
1064+
"/pay/customization/send-transaction",
1065+
"/connect/pay/webhooks": "/pay/webhooks",
1066+
"/connect/pay/testing-pay": "/pay/testing-pay",
1067+
"/connect/pay/faqs": "/pay/faqs",
1068+
};
1069+
10491070
/**
10501071
* @type {import('next').NextConfig['redirects']}
10511072
*/
@@ -1066,6 +1087,7 @@ export const redirects = async () => {
10661087
...createRedirects(unrealEngineRedirects),
10671088
...createRedirects(v4ToV5Redirects),
10681089
...createRedirects(glossaryRedirects),
1090+
...createRedirects(payRedirects),
10691091
];
10701092
};
10711093

apps/portal/src/app/Header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import {
2626
import { ThirdwebIcon } from "../icons/thirdweb";
2727

2828
const links = [
29+
{
30+
name: "Bridge",
31+
href: "/pay",
32+
},
2933
{
3034
name: "Engine",
3135
href: "/engine",
@@ -120,7 +124,7 @@ export const connectLinks: Array<{
120124
const apisLinks = [
121125
{
122126
name: "Insight",
123-
href: "https://insight-api.thirdweb.com/reference",
127+
href: "https://insight.thirdweb.com/reference",
124128
},
125129
{
126130
name: "Engine Cloud",

apps/portal/src/app/connect/sidebar.tsx

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const inAppSlug = "/connect/in-app-wallet";
99
const walletSlug = "/connect/wallet";
1010
const aAslug = "/connect/account-abstraction";
1111
const authSlug = "/connect/auth";
12-
const paySlug = "/connect/pay";
1312

1413
export const sidebar: SideBar = {
1514
name: "Connect",
@@ -229,100 +228,6 @@ export const sidebar: SideBar = {
229228
],
230229
},
231230
{ separator: true },
232-
{
233-
name: "Universal Bridge",
234-
isCollapsible: false,
235-
links: [
236-
{
237-
name: "Overview",
238-
href: `${paySlug}/overview`,
239-
},
240-
{
241-
name: "Supported Routes",
242-
href: "https://thirdweb.com/routes",
243-
},
244-
{
245-
name: "Onramp Providers",
246-
href: `${paySlug}/onramp-providers`,
247-
},
248-
{
249-
name: "Service Fees",
250-
href: `${paySlug}/fees`,
251-
},
252-
{
253-
name: "API",
254-
href: "https://bridge.thirdweb.com/reference",
255-
},
256-
{
257-
name: "Get Started",
258-
href: `${paySlug}/get-started`,
259-
expanded: true,
260-
links: [
261-
{
262-
name: "ConnectButton",
263-
href: `${paySlug}/get-started#option-1-connectbutton`,
264-
},
265-
{
266-
name: "Embed",
267-
href: `${paySlug}/get-started#option-2-embed-pay`,
268-
},
269-
{
270-
name: "Send a Transaction",
271-
href: `${paySlug}/get-started#option-3-send-a-transaction-with-pay`,
272-
},
273-
],
274-
},
275-
{
276-
name: "Tutorials",
277-
isCollapsible: true,
278-
279-
links: [
280-
{
281-
name: "Accept Direct Payments",
282-
href: `${paySlug}/guides/accept-direct-payments`,
283-
},
284-
{
285-
name: "Build a Custom Onramp Experience",
286-
href: `${paySlug}/guides/build-a-custom-experience`,
287-
},
288-
{
289-
name: "Cross-Chain Swapping",
290-
href: `${paySlug}/guides/cross-chain-swapping`,
291-
},
292-
],
293-
},
294-
{
295-
name: "Customization",
296-
isCollapsible: true,
297-
links: [
298-
{
299-
name: "ConnectButton",
300-
href: `${paySlug}/customization/connectbutton`,
301-
},
302-
{
303-
name: "PayEmbed",
304-
href: `${paySlug}/customization/payembed`,
305-
},
306-
{
307-
name: "useSendTransaction",
308-
href: `${paySlug}/customization/send-transaction`,
309-
},
310-
],
311-
},
312-
{
313-
name: "Webhooks",
314-
href: `${paySlug}/webhooks`,
315-
},
316-
{
317-
name: "Developer Mode",
318-
href: `${paySlug}/testing-pay`,
319-
},
320-
{
321-
name: "FAQs",
322-
href: `${paySlug}/faqs`,
323-
},
324-
],
325-
},
326231
// User identity
327232
{
328233
name: "User Identity",

apps/portal/src/app/insight/sidebar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ export const sidebar: SideBar = {
8282
},
8383
{
8484
name: "API Reference",
85-
href: "https://insight-api.thirdweb.com/reference#tag/webhooks",
85+
href: "https://insight.thirdweb.com/reference#tag/webhooks",
8686
},
8787
],
8888
},
8989
{
9090
name: "API Reference",
91-
href: "https://insight-api.thirdweb.com/reference",
91+
href: "https://insight.thirdweb.com/reference",
9292
icon: <BracesIcon />,
9393
},
9494
{

apps/portal/src/app/page.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ function Hero() {
3939
thirdweb Documentation
4040
</h1>
4141
<p className="mb-8 max-w-md text-lg text-muted-foreground leading-normal">
42-
Frontend, Backend, and Onchain tools to build complete web3 apps —
43-
on every EVM chain.
42+
Development framework for building onchain apps, games, and agents.
4443
</p>
4544
</div>
4645
</div>
@@ -115,7 +114,7 @@ function ReferenceSection() {
115114
/>
116115
<SDKCard
117116
title="Insight"
118-
href="https://insight-api.thirdweb.com/reference"
117+
href="https://insight.thirdweb.com/reference#tag/webhooks"
119118
icon={InsightIcon}
120119
isExternal
121120
iconClassName="text-muted-foreground"
@@ -127,13 +126,6 @@ function ReferenceSection() {
127126
isExternal
128127
iconClassName="text-muted-foreground"
129128
/>
130-
<SDKCard
131-
title="Contracts"
132-
href="https://contracts.thirdweb.com/reference"
133-
icon={ContractsIcon}
134-
isExternal
135-
iconClassName="text-muted-foreground"
136-
/>
137129
<SDKCard
138130
title="Wallets"
139131
href="/connect/wallet/get-users" // TODO: actual openAPI docs

apps/portal/src/app/pay/layout.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { DocLayout } from "@/components/Layouts/DocLayout";
2+
import { createMetadata } from "@doc";
3+
import { sidebar } from "./sidebar";
4+
5+
export default async function Layout(props: { children: React.ReactNode }) {
6+
return (
7+
<DocLayout sideBar={sidebar} editPageButton={true}>
8+
{props.children}
9+
</DocLayout>
10+
);
11+
}
12+
13+
export const metadata = createMetadata({
14+
title: "thirdweb Universal Bridge Documentation",
15+
image: {
16+
title: "thirdweb Universal Bridge Docs",
17+
icon: "nebula",
18+
},
19+
description:
20+
"thirdweb Universal Bridge documentation. Learn how to use the thirdweb Universal Bridge to send and receive tokens across different blockchains.",
21+
});

apps/portal/src/app/connect/pay/overview/page.mdx renamed to apps/portal/src/app/pay/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createMetadata, DocImage, Grid, SDKCard, FeatureCard } from "@doc";
2-
import PayOverviewImage from "../assets/pay-overview.png";
3-
import SupportedChains from "../../../_images/supported-chains.png";
2+
import PayOverviewImage from "./assets/pay-overview.png";
3+
import SupportedChains from "../_images/supported-chains.png";
44
import {RocketIcon, ArrowLeftRightIcon, WalletIcon, PencilIcon, ShieldCheckIcon, PiggyBankIcon, GlobeIcon, ComponentIcon} from "lucide-react";
55

66
export const metadata = createMetadata({

apps/portal/src/app/pay/sidebar.tsx

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
import type { SideBar } from "@/components/Layouts/DocLayout";
2+
import {
3+
AlbumIcon,
4+
ArrowLeftRightIcon,
5+
BracesIcon,
6+
CircleDollarSignIcon,
7+
CodeIcon,
8+
FlaskConicalIcon,
9+
MessageCircleQuestionIcon,
10+
PaletteIcon,
11+
RocketIcon,
12+
TriangleRightIcon,
13+
WalletIcon,
14+
WebhookIcon,
15+
} from "lucide-react";
16+
17+
const paySlug = "/pay";
18+
19+
export const sidebar: SideBar = {
20+
name: "Universal Bridge",
21+
links: [
22+
{
23+
name: "Overview",
24+
href: `${paySlug}/overview`,
25+
icon: <WalletIcon />,
26+
},
27+
{
28+
name: "Supported Routes",
29+
href: "https://thirdweb.com/routes",
30+
icon: <ArrowLeftRightIcon />,
31+
},
32+
{
33+
name: "Onramp Providers",
34+
href: `${paySlug}/onramp-providers`,
35+
icon: <TriangleRightIcon />,
36+
},
37+
{
38+
name: "Service Fees",
39+
href: `${paySlug}/fees`,
40+
icon: <CircleDollarSignIcon />,
41+
},
42+
{
43+
name: "Get Started",
44+
href: `${paySlug}/get-started`,
45+
icon: <RocketIcon />,
46+
links: [
47+
{
48+
name: "ConnectButton",
49+
href: `${paySlug}/get-started#option-1-connectbutton`,
50+
},
51+
{
52+
name: "Embed",
53+
href: `${paySlug}/get-started#option-2-embed-pay`,
54+
},
55+
{
56+
name: "Send a Transaction",
57+
href: `${paySlug}/get-started#option-3-send-a-transaction-with-pay`,
58+
},
59+
],
60+
},
61+
{
62+
name: "Tutorials",
63+
isCollapsible: true,
64+
icon: <AlbumIcon />,
65+
links: [
66+
{
67+
name: "Accept Direct Payments",
68+
href: `${paySlug}/guides/accept-direct-payments`,
69+
},
70+
{
71+
name: "Build a Custom Onramp Experience",
72+
href: `${paySlug}/guides/build-a-custom-experience`,
73+
},
74+
{
75+
name: "Cross-Chain Swapping",
76+
href: `${paySlug}/guides/cross-chain-swapping`,
77+
},
78+
],
79+
},
80+
{
81+
name: "Customization",
82+
isCollapsible: true,
83+
icon: <PaletteIcon />,
84+
links: [
85+
{
86+
name: "ConnectButton",
87+
href: `${paySlug}/customization/connectbutton`,
88+
},
89+
{
90+
name: "PayEmbed",
91+
href: `${paySlug}/customization/payembed`,
92+
},
93+
{
94+
name: "useSendTransaction",
95+
href: `${paySlug}/customization/send-transaction`,
96+
},
97+
],
98+
},
99+
{
100+
name: "API Reference",
101+
href: "https://bridge.thirdweb.com/reference",
102+
icon: <BracesIcon />,
103+
},
104+
{
105+
name: "SDK Reference",
106+
href: "/typescript/v5/buy/quote",
107+
icon: <CodeIcon />,
108+
links: [
109+
{
110+
name: "TypeScript SDK",
111+
href: "/typescript/v5/buy/quote",
112+
},
113+
],
114+
},
115+
{
116+
name: "Webhooks",
117+
href: `${paySlug}/webhooks`,
118+
icon: <WebhookIcon />,
119+
},
120+
{
121+
name: "Developer Mode",
122+
href: `${paySlug}/testing-pay`,
123+
icon: <FlaskConicalIcon />,
124+
},
125+
{
126+
name: "FAQs",
127+
href: `${paySlug}/faqs`,
128+
icon: <MessageCircleQuestionIcon />,
129+
},
130+
],
131+
};

0 commit comments

Comments
 (0)