From f6a2c48d313a22763b7ae5afe463dde5e66e3f86 Mon Sep 17 00:00:00 2001 From: "[dyad]" Date: Tue, 20 Jan 2026 14:57:54 +0100 Subject: [PATCH] [dyad] Improved schema display clarity - wrote 1 file(s) --- src/components/pretty-schema-display.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/pretty-schema-display.tsx b/src/components/pretty-schema-display.tsx index e2bc945..cd13b38 100644 --- a/src/components/pretty-schema-display.tsx +++ b/src/components/pretty-schema-display.tsx @@ -2,7 +2,6 @@ import React from "react"; import { Badge } from "@/components/ui/badge"; -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Link as LinkIcon, Type, @@ -82,9 +81,11 @@ const renderValue = (value: any): React.ReactNode => { if (typeof value === "object" && value !== null) { if (Array.isArray(value)) { return ( -
+
{value.map((item, index) => ( -
{renderValue(item)}
+
+ {renderValue(item)} +
))}
); @@ -103,7 +104,7 @@ const SchemaObjectRenderer = ({ isNested?: boolean; }) => { const content = ( -
+
{Object.entries(data).map(([key, value]) => { if (key === "@context") return null; const label = @@ -113,15 +114,15 @@ const SchemaObjectRenderer = ({ return (
-
+
{Icon && } - {label}: + {label}
-
+
{key === "@type" ? ( - {value as string} + {value as string} ) : ( renderValue(value) )} @@ -134,7 +135,7 @@ const SchemaObjectRenderer = ({ if (isNested) { return ( -
{content}
+
{content}
); }