feat(create): wizard uploads render as images in display and exports (imageUrl/fileUrl)

This commit is contained in:
adilallo committed 2026-05-08 21:38:18 -06:00
1 parent 026a1e6d71
commit 89fd5f3ade
7 files changed
+170 -13

No files matched your search

+4 -1
View File
@@ -6,7 +6,10 @@ import type {
function isLabeledBlock(x: unknown): x is CommunityRuleLabeledBlock {
if (!x || typeof x !== "object") return false;
const o = x as Record<string, unknown>;
return typeof o.label === "string" && typeof o.body === "string";
if (typeof o.label !== "string" || typeof o.body !== "string") return false;
if (o.imageUrl !== undefined && typeof o.imageUrl !== "string") return false;
if (o.fileUrl !== undefined && typeof o.fileUrl !== "string") return false;
return true;
}
/** Shared by publish payload parsing and template body parsing — keep in sync. */