diff options
Diffstat (limited to 'components/Sidebar/Link.tsx')
-rw-r--r-- | components/Sidebar/Link.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/Sidebar/Link.tsx b/components/Sidebar/Link.tsx index c4eea2f..6130eb5 100644 --- a/components/Sidebar/Link.tsx +++ b/components/Sidebar/Link.tsx @@ -41,6 +41,8 @@ export interface LinkProps { linksByNodeId: LinksByNodeId isWiki?: boolean noUnderline?: boolean + attachDir: string + macros: { [key: string]: string } } export interface NodeLinkProps { @@ -138,6 +140,8 @@ export const PreviewLink = (props: LinkProps) => { noUnderline, linksByNodeId, isWiki, + macros, + attachDir, } = props // TODO figure out how to properly type this // see https://github.com/rehypejs/rehype-react/issues/25 @@ -148,7 +152,7 @@ export const PreviewLink = (props: LinkProps) => { const extraNoteStyle = outline ? outlineNoteStyle : viewerNoteStyle console.log(previewNode) const getText = () => { - fetch(`http://localhost:35901/file/${file}`) + fetch(`http://localhost:35901/node/${id}`) .then((res) => { return res.text() }) @@ -290,6 +294,8 @@ export const PreviewLink = (props: LinkProps) => { openContextMenu, outline, linksByNodeId, + macros, + attachDir, }} previewNode={nodeById[id]!} collapse={false} |