diff --git a/apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx b/apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx index 9604218d930..f11aad927ae 100644 --- a/apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx +++ b/apps/playground-web/src/app/insight/[blueprint_slug]/page.tsx @@ -1,3 +1,4 @@ +import { Badge } from "@/components/ui/badge"; import { Breadcrumb, BreadcrumbItem, @@ -5,6 +6,7 @@ import { BreadcrumbList, BreadcrumbSeparator, } from "@/components/ui/breadcrumb"; +import { cn } from "@/lib/utils"; import { redirect } from "next/navigation"; import { THIRDWEB_CLIENT } from "../../../lib/client"; import { isProd } from "../../../lib/env"; @@ -53,8 +55,28 @@ export default async function Page(props: {

- {title} +
+ + {title} + + {pathMetadata.deprecated && ( + + Deprecated + + )} +

+ {pathMetadata.deprecated && ( +
+
+ {pathMetadata.description} +
+
+ )} @@ -60,10 +61,19 @@ function BlueprintSection(props: { {item.name} + {item.deprecated && ( + + Deprecated + + )} diff --git a/apps/playground-web/src/app/insight/utils.ts b/apps/playground-web/src/app/insight/utils.ts index b07558fda8b..f17b1087fdd 100644 --- a/apps/playground-web/src/app/insight/utils.ts +++ b/apps/playground-web/src/app/insight/utils.ts @@ -20,6 +20,7 @@ export type BlueprintListItem = { name: string; path: string; method: string; + deprecated: boolean; }[]; }; @@ -36,6 +37,7 @@ export type MinimalBlueprintSpec = { paths: { name: string; path: string; + deprecated: boolean; }[]; }; diff --git a/apps/playground-web/src/app/navLinks.ts b/apps/playground-web/src/app/navLinks.ts index 0390ebbfe80..dc8ce973c1e 100644 --- a/apps/playground-web/src/app/navLinks.ts +++ b/apps/playground-web/src/app/navLinks.ts @@ -141,6 +141,7 @@ export function getSidebarLinks() { return { name: pathInfo.name, href: `/insight/${blueprint.id}?path=${pathInfo.path}`, + crossedOut: pathInfo.deprecated, }; }), }; diff --git a/apps/playground-web/src/components/ui/sidebar.tsx b/apps/playground-web/src/components/ui/sidebar.tsx index 35e3441765e..0b9da32a758 100644 --- a/apps/playground-web/src/components/ui/sidebar.tsx +++ b/apps/playground-web/src/components/ui/sidebar.tsx @@ -11,6 +11,7 @@ import { CustomAccordion } from "./CustomAccordion"; export type LinkMeta = { name: string; href: string; + crossedOut?: boolean; }; export type LinkGroup = { @@ -83,6 +84,7 @@ function SidebarItem(props: { link: SidebarLink; onLinkClick?: () => void }) { className={clsx( "block overflow-hidden text-ellipsis py-1 font-medium transition-colors duration-300 hover:text-foreground lg:text-base", isActive ? "text-foreground" : "text-muted-foreground", + "crossedOut" in link && link.crossedOut && "line-through", )} > {link.name}