summaryrefslogtreecommitdiff
path: root/util/uniorg.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'util/uniorg.tsx')
-rw-r--r--util/uniorg.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/util/uniorg.tsx b/util/uniorg.tsx
index 7ffd3b8..6580b9c 100644
--- a/util/uniorg.tsx
+++ b/util/uniorg.tsx
@@ -13,6 +13,8 @@ export interface UniOrgProps {
outline: boolean
collapse: boolean
linksByNodeId: LinksByNodeId
+ macros?: { [key: string]: string }
+ attachDir: string
}
export const UniOrg = (props: UniOrgProps) => {
@@ -26,13 +28,15 @@ export const UniOrg = (props: UniOrgProps) => {
outline,
collapse,
linksByNodeId,
+ macros,
+ attachDir,
} = props
const [previewText, setPreviewText] = useState('')
- const file = encodeURIComponent(encodeURIComponent(previewNode.file))
+ const id = encodeURIComponent(encodeURIComponent(previewNode.id))
useEffect(() => {
- fetch(`http://localhost:35901/file/${file}`)
+ fetch(`http://localhost:35901/node/${id}`)
.then((res) => {
return res.text()
})
@@ -67,7 +71,9 @@ export const UniOrg = (props: UniOrgProps) => {
outline,
collapse,
linksByNodeId,
+ attachDir,
}}
+ macros={macros || {}}
/>
)}
</>