summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorErik Hetzner <[email protected]>2022-01-17 07:38:57 -0800
committerErik Hetzner <[email protected]>2022-01-17 08:12:03 -0800
commitbb7036f4cfd279de388e9850b452b252fefb8e5b (patch)
tree0c0e7f260643a59cdb0be2716c06b056e08f9c7d /util
parent5ecd418060bf606924ac86faa1aa4036d4c785fb (diff)
Do not assume that a node is the entire file
A roam node is no longer necessarily an entire file. It can be a file, or any heading with an id. Fixes #106
Diffstat (limited to 'util')
-rw-r--r--util/uniorg.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/uniorg.tsx b/util/uniorg.tsx
index c4407f2..6580b9c 100644
--- a/util/uniorg.tsx
+++ b/util/uniorg.tsx
@@ -34,9 +34,9 @@ export const UniOrg = (props: UniOrgProps) => {
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()
})