chore(react/type_widget): port render note partially

This commit is contained in:
Elian Doran
2025-09-21 22:09:35 +03:00
parent 61278e1f5a
commit 70d0a5441a
4 changed files with 40 additions and 22 deletions

View File

@@ -33,6 +33,7 @@ const TYPE_MAPPINGS: Record<ExtendedNoteType, () => Promise<{ default: TypeWidge
"attachmentList": async () => (await import("./type_widgets/Attachment")).AttachmentList,
"attachmentDetail": async () => (await import("./type_widgets/Attachment")).AttachmentDetail,
"readOnlyText": () => import("./type_widgets/text/ReadOnlyText"),
"render": () => import("./type_widgets/Render")
// TODO: finalize the record.
};
@@ -148,7 +149,6 @@ async function getCorrespondingWidget(type: ExtendedNoteType, props: TypeWidgetP
if (!correspondingType) return null;
const result = await correspondingType();
console.log("For type ", type, " got ", result);
if ("default" in result) {
const Component = result.default;