diff options
Diffstat (limited to 'components/Sidebar/Backlinks.tsx')
-rw-r--r-- | components/Sidebar/Backlinks.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/Sidebar/Backlinks.tsx b/components/Sidebar/Backlinks.tsx index 892af8c..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 @@ -16,6 +16,8 @@ export interface BacklinksProps { setSidebarHighlightedNode: OrgRoamNode openContextMenu: any outline: boolean + attachDir: string + macros: { [key: string]: string } } import { PreviewLink } from './Link' @@ -32,8 +34,10 @@ export const Backlinks = (props: BacklinksProps) => { nodeByCite, openContextMenu, outline, + macros, + attachDir, } = props - const links = linksByNodeId[previewNode?.id] ?? [] + const links = linksByNodeId[(previewNode as OrgRoamNode)?.id] ?? [] const backLinks = links .filter((link: LinkObject) => { @@ -69,6 +73,7 @@ export const Backlinks = (props: BacklinksProps) => { openContextMenu={openContextMenu} outline={outline} noUnderline + {...{ attachDir, macros }} > {nodeById[link as string]?.title} </PreviewLink> |