diff options
| author | sharkiecodes <lanyi_stroud@brown.edu> | 2025-04-21 19:41:51 -0400 |
|---|---|---|
| committer | sharkiecodes <lanyi_stroud@brown.edu> | 2025-04-21 19:41:51 -0400 |
| commit | 5290e6a69fdadb6037f3d8a03f5ed82e00927520 (patch) | |
| tree | 2ab7cb47f242905b14f78653ba74024b9b4b0b5a /src/client/views/nodes/scrapbook/ScrapbookContent.tsx | |
| parent | 17e24e780b54f2f7015c0ca955c3aa5091bba19c (diff) | |
attempting to integrate scrapbooks
Diffstat (limited to 'src/client/views/nodes/scrapbook/ScrapbookContent.tsx')
| -rw-r--r-- | src/client/views/nodes/scrapbook/ScrapbookContent.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
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<ScrapbookContentProps> = 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 ( + <div className="scrapbook-content"> + <h3>{titleText}</h3> + <p>{contentText}</p> + </div> + ); +}); |
