Skip to content

Commit 35ff719

Browse files
committed
[TOOL-5111] Playground: Update slugs, add redirects
1 parent 88d44af commit 35ff719

File tree

69 files changed

+196
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+196
-165
lines changed

apps/playground-web/next.config.mjs

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,59 @@ const nextConfig = {
5757
async redirects() {
5858
return [
5959
{
60-
destination: "/connect/sign-in/button",
60+
source: "/connect/pay",
61+
destination: "/payments/ui-components",
6162
permanent: false,
62-
source: "/connect/sign-in",
6363
},
6464
{
65-
destination: "/connect/account-abstraction/connect",
65+
source: "/connect/pay/:path*",
66+
destination: "/payments/:path*",
67+
permanent: false,
68+
},
69+
{
70+
source: "/connect/ui",
71+
destination: "/wallets/headless/account-components",
72+
permanent: false,
73+
},
74+
{
75+
source: "/connect/ui/nft",
76+
destination: "/wallets/headless/nft-components",
77+
permanent: false,
78+
},
79+
{
80+
source: "/connect/ui/token",
81+
destination: "/wallets/headless/token-components",
82+
permanent: false,
83+
},
84+
{
85+
source: "/connect/ui/chain",
86+
destination: "/wallets/headless/chain-components",
87+
permanent: false,
88+
},
89+
{
90+
source: "/connect/ui/wallet",
91+
destination: "/wallets/headless/wallet-components",
92+
permanent: false,
93+
},
94+
{
95+
source: "/connect/:path*",
96+
destination: "/wallets/:path*",
97+
permanent: false,
98+
},
99+
{
100+
source: "/engine/airdrop",
101+
destination: "/transactions/airdrop-tokens",
102+
permanent: false,
103+
},
104+
{
105+
source: "/engine/minting",
106+
destination: "/transactions/mint-tokens",
107+
permanent: false,
108+
},
109+
{
110+
source: "/engine/webhooks",
111+
destination: "/transactions/webhooks",
66112
permanent: false,
67-
source: "/connect/account-abstraction",
68113
},
69114
];
70115
},

apps/playground-web/src/app/navLinks.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,74 +6,74 @@ const staticSidebarLinks: SidebarLink[] = [
66
isCollapsible: false,
77
links: [
88
{
9-
href: "/connect/sign-in/button",
9+
href: "/wallets/sign-in/button",
1010
name: "ConnectButton",
1111
},
1212
{
13-
href: "/connect/sign-in/embed",
13+
href: "/wallets/sign-in/embed",
1414
name: "ConnectEmbed",
1515
},
1616
{
17-
href: "/connect/sign-in/headless",
17+
href: "/wallets/sign-in/headless",
1818
name: "Headless Connect",
1919
},
2020
{
21-
href: "/connect/in-app-wallet",
21+
href: "/wallets/in-app-wallet",
2222
name: "In-App Wallets",
2323
},
2424
{
25-
href: "/connect/in-app-wallet/ecosystem",
25+
href: "/wallets/in-app-wallet/ecosystem",
2626
name: "Ecosystem Wallets",
2727
},
2828
{
29-
href: "/connect/account-abstraction/sponsor",
29+
href: "/wallets/account-abstraction/sponsor",
3030
name: "EIP-4337",
3131
},
3232
{
33-
href: "/connect/account-abstraction/7702",
33+
href: "/wallets/account-abstraction/7702",
3434
name: "EIP-7702",
3535
},
3636
{
37-
href: "/connect/account-abstraction/5792",
37+
href: "/wallets/account-abstraction/5792",
3838
name: "EIP-5792",
3939
},
4040
{
41-
href: "/connect/account-abstraction/native-aa",
41+
href: "/wallets/account-abstraction/native-aa",
4242
name: "Native AA (zkSync)",
4343
},
4444
{
45-
href: "/connect/auth",
45+
href: "/wallets/auth",
4646
name: "Auth",
4747
},
4848
{
49-
href: "/connect/social",
49+
href: "/wallets/social",
5050
name: "Social",
5151
},
5252
{
53-
href: "/connect/blockchain-api",
53+
href: "/wallets/blockchain-api",
5454
name: "Blockchain API",
5555
},
5656
{
5757
expanded: false,
5858
links: [
5959
{
60-
href: "/connect/ui",
60+
href: "/wallets/headless/account-components",
6161
name: "Account",
6262
},
6363
{
64-
href: "/connect/ui/nft",
64+
href: "/wallets/headless/nft-components",
6565
name: "NFT",
6666
},
6767
{
68-
href: "/connect/ui/token",
68+
href: "/wallets/headless/token-components",
6969
name: "Token",
7070
},
7171
{
72-
href: "/connect/ui/chain",
72+
href: "/wallets/headless/chain-components",
7373
name: "Chain",
7474
},
7575
{
76-
href: "/connect/ui/wallet",
76+
href: "/wallets/headless/wallet-components",
7777
name: "Wallet",
7878
},
7979
],
@@ -89,23 +89,23 @@ const universalBridgeSidebarLinks: SidebarLink = {
8989
isCollapsible: false,
9090
links: [
9191
{
92-
href: "/connect/pay",
92+
href: "/payments/ui-components",
9393
name: "UI Component",
9494
},
9595
{
96-
href: "/connect/pay/fund-wallet",
96+
href: "/payments/fund-wallet",
9797
name: "Buy Crypto",
9898
},
9999
{
100-
href: "/connect/pay/commerce",
100+
href: "/payments/commerce",
101101
name: "Checkout",
102102
},
103103
{
104-
href: "/connect/pay/transactions",
104+
href: "/payments/transactions",
105105
name: "Transactions",
106106
},
107107
{
108-
href: "/connect/pay/backend",
108+
href: "/payments/backend",
109109
name: "Backend API",
110110
},
111111
],
@@ -117,15 +117,15 @@ const engineSidebarLinks: SidebarLink = {
117117
isCollapsible: false,
118118
links: [
119119
{
120-
href: "/engine/airdrop",
120+
href: "/transactions/airdrop-tokens",
121121
name: "Airdrop",
122122
},
123123
{
124-
href: "/engine/minting",
124+
href: "/transactions/mint-tokens",
125125
name: "Mint NFTs",
126126
},
127127
{
128-
href: "/engine/webhooks",
128+
href: "/transactions/webhooks",
129129
name: "Webhooks",
130130
},
131131
],

apps/playground-web/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { redirect } from "next/navigation";
22

33
export default function Page() {
4-
redirect("/connect/sign-in/button");
4+
redirect("/wallets/sign-in/button");
55
}

apps/playground-web/src/app/connect/pay/backend/layout.tsx renamed to apps/playground-web/src/app/payments/backend/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type React from "react";
2-
import { PageHeader } from "../../../../components/blocks/APIHeader";
2+
import { PageHeader } from "../../../components/blocks/APIHeader";
33

44
export default function Layout(props: { children: React.ReactNode }) {
55
return (
@@ -8,7 +8,7 @@ export default function Layout(props: { children: React.ReactNode }) {
88
description={
99
<>HTTP API to bridge, swap and onramp to and from any currency</>
1010
}
11-
docsLink="https://portal.thirdweb.com/connect/pay/overview?utm_source=playground"
11+
docsLink="https://portal.thirdweb.com/payments?utm_source=playground"
1212
title="Payments API"
1313
/>
1414

apps/playground-web/src/app/connect/pay/backend/page.tsx renamed to apps/playground-web/src/app/payments/backend/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default async function Page() {
3838
}
3939
return {
4040
description: pathObj.get?.description || "",
41-
link: `/connect/pay/backend/reference?route=${pathName}`,
41+
link: `/payments/backend/reference?route=${pathName}`,
4242
name: pathName,
4343
};
4444
})}

apps/playground-web/src/app/connect/pay/backend/reference/page.tsx renamed to apps/playground-web/src/app/payments/backend/reference/page.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import {
66
BreadcrumbList,
77
BreadcrumbSeparator,
88
} from "@/components/ui/breadcrumb";
9-
import { THIRDWEB_CLIENT } from "../../../../../lib/client";
10-
import { isProd } from "../../../../../lib/env";
11-
import { BlueprintPlayground } from "../../../../insight/[blueprint_slug]/blueprint-playground.client";
9+
import { THIRDWEB_CLIENT } from "../../../../lib/client";
10+
import { isProd } from "../../../../lib/env";
11+
import { BlueprintPlayground } from "../../../insight/[blueprint_slug]/blueprint-playground.client";
1212
import { getBridgePaths } from "../utils";
1313

1414
export default async function Page(props: {
@@ -20,7 +20,7 @@ export default async function Page(props: {
2020

2121
// invalid url
2222
if (!params.route) {
23-
redirect("/connect/pay/backend");
23+
redirect("/payments/backend");
2424
}
2525

2626
const thirdwebDomain = !isProd ? "thirdweb-dev" : "thirdweb";
@@ -31,7 +31,7 @@ export default async function Page(props: {
3131

3232
// invalid url
3333
if (!pathMetadata) {
34-
redirect("/connect/pay/backend");
34+
redirect("/payments/backend");
3535
}
3636

3737
const title = pathMetadata.summary || "";
@@ -46,7 +46,7 @@ export default async function Page(props: {
4646
)}
4747

4848
<BlueprintPlayground
49-
backLink={"/connect/pay/backend"}
49+
backLink={"/payments/backend"}
5050
clientId={THIRDWEB_CLIENT.clientId}
5151
domain={domain}
5252
key={params.route}
@@ -63,9 +63,7 @@ function Breadcrumbs() {
6363
<Breadcrumb>
6464
<BreadcrumbList>
6565
<BreadcrumbItem>
66-
<BreadcrumbLink href="/connect/pay/backend">
67-
Payments API
68-
</BreadcrumbLink>
66+
<BreadcrumbLink href="/payments/backend">Payments API</BreadcrumbLink>
6967
</BreadcrumbItem>
7068
<BreadcrumbSeparator />
7169
</BreadcrumbList>

apps/playground-web/src/app/connect/pay/backend/utils.ts renamed to apps/playground-web/src/app/payments/backend/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { OpenAPIV3 } from "openapi-types";
2-
import { isProd } from "../../../../lib/env";
2+
import { isProd } from "../../../lib/env";
33

44
export async function getBridgePaths() {
55
const thirdwebDomain = !isProd ? "thirdweb-dev" : "thirdweb";

apps/playground-web/src/app/connect/pay/commerce/page.tsx renamed to apps/playground-web/src/app/payments/commerce/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default function Page() {
2121
Let your users pay for any service with fiat or crypto on any chain.
2222
</>
2323
}
24-
docsLink="https://portal.thirdweb.com/connect/pay/get-started?utm_source=playground"
24+
docsLink="https://portal.thirdweb.com/payments?utm_source=playground"
2525
title="Commerce payments with fiat or crypto"
2626
>
2727
<BuyMerch />

apps/playground-web/src/app/connect/pay/components/CodeGen.tsx renamed to apps/playground-web/src/app/payments/components/CodeGen.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { lazy, Suspense } from "react";
2-
import { CodeLoading } from "../../../../components/code/code.client";
2+
import { CodeLoading } from "../../../components/code/code.client";
33
import type { BridgeComponentsPlaygroundOptions } from "./types";
44

5-
const CodeClient = lazy(
6-
() => import("../../../../components/code/code.client"),
7-
);
5+
const CodeClient = lazy(() => import("../../../components/code/code.client"));
86

97
export function CodeGen(props: { options: BridgeComponentsPlaygroundOptions }) {
108
return (

0 commit comments

Comments
 (0)