From bb7036f4cfd279de388e9850b452b252fefb8e5b Mon Sep 17 00:00:00 2001 From: Erik Hetzner Date: Mon, 17 Jan 2022 07:38:57 -0800 Subject: 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 --- util/uniorg.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') 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() }) -- cgit v1.2.3