From 2d76cf904079cc74809f571b67ac746fad7aa04f Mon Sep 17 00:00:00 2001 From: MananTank Date: Mon, 8 Sep 2025 23:03:32 +0000 Subject: [PATCH] [BLD-259] Playground, Portal: Add revalidation for API Reference page (#8022) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ## 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}` --- apps/playground-web/src/app/reference/page.tsx | 10 +++++++++- apps/portal/src/app/reference/page.tsx | 6 ++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/playground-web/src/app/reference/page.tsx b/apps/playground-web/src/app/reference/page.tsx index cffc2f1ab3f..5e19911c4c9 100644 --- a/apps/playground-web/src/app/reference/page.tsx +++ b/apps/playground-web/src/app/reference/page.tsx @@ -1,7 +1,15 @@ -import { ScalarApiReference } from "../../components/blocks/scalar-api/ScalarClient"; +import { ScalarApiReference } from "@/components/blocks/scalar-api/ScalarClient"; +import { createMetadata } from "@/lib/metadata"; export default async function ReferencePage() { const responses = await fetch("https://api.thirdweb.com/openapi.json"); const spec = await responses.json(); return ; } + +export const metadata = createMetadata({ + title: "thirdwebAPI Reference", + description: "A Unified interface for Web3 development", +}); + +export const revalidate = 3600; diff --git a/apps/portal/src/app/reference/page.tsx b/apps/portal/src/app/reference/page.tsx index 97553593f83..6c10be22373 100644 --- a/apps/portal/src/app/reference/page.tsx +++ b/apps/portal/src/app/reference/page.tsx @@ -3,11 +3,11 @@ import { ScalarApiReference } from "./ScalarClient"; export const metadata = createMetadata({ image: { - title: "API Reference", + title: "thirdweb API Reference", icon: "thirdweb", }, title: "thirdweb API Reference", - description: "Complete REST API reference for all thirdweb services", + description: "A Unified interface for Web3 development", }); export default async function ApiReferencePage() { @@ -19,3 +19,5 @@ export default async function ApiReferencePage() { ); } + +export const revalidate = 3600;