diff options
author | Erik Hetzner <[email protected]> | 2022-01-17 07:38:57 -0800 |
---|---|---|
committer | Erik Hetzner <[email protected]> | 2022-01-17 08:12:03 -0800 |
commit | bb7036f4cfd279de388e9850b452b252fefb8e5b (patch) | |
tree | 0c0e7f260643a59cdb0be2716c06b056e08f9c7d /util/uniorg.tsx | |
parent | 5ecd418060bf606924ac86faa1aa4036d4c785fb (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/uniorg.tsx')
-rw-r--r-- | util/uniorg.tsx | 4 |
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() }) |