diff --git a/src/components/pretty-schema-display.tsx b/src/components/pretty-schema-display.tsx
index fa0859b..b251052 100644
--- a/src/components/pretty-schema-display.tsx
+++ b/src/components/pretty-schema-display.tsx
@@ -90,12 +90,31 @@ const renderValue = (value: any, level: number): React.ReactNode => {
);
}
- return ;
+ return (
+
+ );
}
return {String(value)};
};
+const FaqQuestion = ({ item }: { item: any }) => {
+ if (
+ item["@type"] === "Question" &&
+ item.name &&
+ item.acceptedAnswer?.text
+ ) {
+ return (
+
+
{item.name}
+
{item.acceptedAnswer.text}
+
+ );
+ }
+ // Fallback for non-standard Q&A items
+ return ;
+};
+
const SchemaObjectRenderer = ({
data,
isNested = false,
@@ -115,6 +134,27 @@ const SchemaObjectRenderer = ({
>
{Object.entries(data).map(([key, value]) => {
if (key === "@context") return null;
+
+ // Custom rendering for FAQPage questions
+ if (
+ key === "mainEntity" &&
+ data["@type"] === "FAQPage" &&
+ Array.isArray(value)
+ ) {
+ return (
+
+
+ Questions
+
+
+ {value.map((item, index) => (
+
+ ))}
+
+
+ );
+ }
+
const label =
keyMappings[key] || key.charAt(0).toUpperCase() + key.slice(1);
const Icon = keyIcons[key];