UI enhancements

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
This commit is contained in:
Antony Sallas 2025-10-28 18:29:23 +08:00
parent 5ef6ccf90e
commit 9964287698
7 changed files with 2688 additions and 1584 deletions

View file

@ -34,7 +34,14 @@ export default function ContentDetailPage() {
const getTextFromContent = (content: unknown): string => {
if (typeof content === "string") {
return content;
} else if (content && content.type === "text") {
} else if (
content &&
typeof content === "object" &&
"type" in content &&
content.type === "text" &&
"text" in content &&
typeof content.text === "string"
) {
return content.text;
}
return "";