diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-10-09 14:08:34 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-10-09 14:08:34 +0200 |
commit | 03641ca2868d5ef21ffe426fa547dd859ce1c474 (patch) | |
tree | 73500c4a178f25f2d34b66c4dccdbcf10ee7ee83 /components/Sidebar/Link.tsx | |
parent | 2384b30a244c7d6477e54de5385fe7f1cc62d43a (diff) |
fix(preview): changed from api routing to emacs server
Diffstat (limited to 'components/Sidebar/Link.tsx')
-rw-r--r-- | components/Sidebar/Link.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/Sidebar/Link.tsx b/components/Sidebar/Link.tsx index 9515b6d..1211cb4 100644 --- a/components/Sidebar/Link.tsx +++ b/components/Sidebar/Link.tsx @@ -129,10 +129,9 @@ export const PreviewLink = (props: LinkProps) => { }, }) - const file = encodeURIComponent(nodeById[id]?.file as string) + const file = encodeURIComponent(encodeURIComponent(nodeById[id]?.file as string)) const getText = () => { - console.log(nodeById[id]?.title) - fetch(`api/notes/${file}`) + fetch(`http://localhost:35901/file/${file}`) .then((res) => { return res.text() }) |