From 5290e6a69fdadb6037f3d8a03f5ed82e00927520 Mon Sep 17 00:00:00 2001 From: sharkiecodes Date: Mon, 21 Apr 2025 19:41:51 -0400 Subject: attempting to integrate scrapbooks --- .../views/nodes/scrapbook/ScrapbookContent.tsx | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/client/views/nodes/scrapbook/ScrapbookContent.tsx (limited to 'src/client/views/nodes/scrapbook/ScrapbookContent.tsx') diff --git a/src/client/views/nodes/scrapbook/ScrapbookContent.tsx b/src/client/views/nodes/scrapbook/ScrapbookContent.tsx new file mode 100644 index 000000000..ad1d308e8 --- /dev/null +++ b/src/client/views/nodes/scrapbook/ScrapbookContent.tsx @@ -0,0 +1,23 @@ +import React from "react"; +import { observer } from "mobx-react-lite"; +// Import the Doc type from your actual module. +import { Doc } from "../../../../fields/Doc"; + +export interface ScrapbookContentProps { + doc: Doc; +} + +// A simple view that displays a document's title and content. +// Adjust how you extract the text if your Doc fields are objects. +export const ScrapbookContent: React.FC = observer(({ doc }) => { + // If doc.title or doc.content are not plain strings, convert them. + const titleText = doc.title ? doc.title.toString() : "Untitled"; + const contentText = doc.content ? doc.content.toString() : "No content available."; + + return ( +
+

{titleText}

+

{contentText}

+
+ ); +}); -- cgit v1.2.3-70-g09d2