Skip to content

Commit 2d76cf9

Browse files
committed
[BLD-259] Playground, Portal: Add revalidation for API Reference page (#8022)
<!-- ## 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 updates the metadata and content for the API reference pages in the `portal` and `playground-web` applications, enhancing the descriptions and titles to better reflect the purpose of the APIs. It also introduces a revalidation period for both pages. ### Detailed summary - Updated `metadata` in `apps/portal/src/app/reference/page.tsx`: - Changed `title` from "API Reference" to "thirdweb API Reference". - Changed `description` from "Complete REST API reference for all thirdweb services" to "A Unified interface for Web3 development". - Added `revalidate` property with value `3600` in `apps/portal/src/app/reference/page.tsx`. - In `apps/playground-web/src/app/reference/page.tsx`: - Imported `ScalarApiReference` and `createMetadata`. - Added `metadata` with `title` "thirdwebAPI Reference" and `description` "A Unified interface for Web3 development". - Added `revalidate` property with value `3600`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent e7d0899 commit 2d76cf9

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
import { ScalarApiReference } from "../../components/blocks/scalar-api/ScalarClient";
1+
import { ScalarApiReference } from "@/components/blocks/scalar-api/ScalarClient";
2+
import { createMetadata } from "@/lib/metadata";
23

34
export default async function ReferencePage() {
45
const responses = await fetch("https://api.thirdweb.com/openapi.json");
56
const spec = await responses.json();
67
return <ScalarApiReference spec={spec} />;
78
}
9+
10+
export const metadata = createMetadata({
11+
title: "thirdwebAPI Reference",
12+
description: "A Unified interface for Web3 development",
13+
});
14+
15+
export const revalidate = 3600;

apps/portal/src/app/reference/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { ScalarApiReference } from "./ScalarClient";
33

44
export const metadata = createMetadata({
55
image: {
6-
title: "API Reference",
6+
title: "thirdweb API Reference",
77
icon: "thirdweb",
88
},
99
title: "thirdweb API Reference",
10-
description: "Complete REST API reference for all thirdweb services",
10+
description: "A Unified interface for Web3 development",
1111
});
1212

1313
export default async function ApiReferencePage() {
@@ -19,3 +19,5 @@ export default async function ApiReferencePage() {
1919
</div>
2020
);
2121
}
22+
23+
export const revalidate = 3600;

0 commit comments

Comments
 (0)