diff options
author | Thomas F. K. Jorna <[email protected]> | 2022-01-29 15:55:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-29 15:55:09 +0100 |
commit | 5a93993de3163fa88ce2a9d341371d62bc4e13d5 (patch) | |
tree | 86730114dde5d3bd872f088ead3d684fb50392cb /components/Sidebar | |
parent | f1e1769d97e4f44d7336839db587b0acbb918d99 (diff) | |
parent | 7da981397e9f0700d39d144b2b2591c127f2786a (diff) |
Merge pull request #208 from org-roam/fix/106
Diffstat (limited to 'components/Sidebar')
-rw-r--r-- | components/Sidebar/Backlinks.tsx | 4 | ||||
-rw-r--r-- | components/Sidebar/Link.tsx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/components/Sidebar/Backlinks.tsx b/components/Sidebar/Backlinks.tsx index 9bfb1fe..6a5dd00 100644 --- a/components/Sidebar/Backlinks.tsx +++ b/components/Sidebar/Backlinks.tsx @@ -8,7 +8,7 @@ import React from 'react' import { ProcessedOrg } from '../../util/processOrg' export interface BacklinksProps { - previewNode: any + previewNode: NodeObject | OrgRoamNode setPreviewNode: any nodeById: NodeById linksByNodeId: LinksByNodeId @@ -37,7 +37,7 @@ export const Backlinks = (props: BacklinksProps) => { macros, attachDir, } = props - const links = linksByNodeId[previewNode?.id] ?? [] + const links = linksByNodeId[(previewNode as OrgRoamNode)?.id] ?? [] const backLinks = links .filter((link: LinkObject) => { diff --git a/components/Sidebar/Link.tsx b/components/Sidebar/Link.tsx index e5b1102..6130eb5 100644 --- a/components/Sidebar/Link.tsx +++ b/components/Sidebar/Link.tsx @@ -152,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() }) |