1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-05-05 01:27:46 +07:00

add backlinks

This commit is contained in:
Fedor Katurov 2023-06-11 20:16:55 +06:00
parent 6222b75563
commit 811e7740a9
21 changed files with 257 additions and 56 deletions
src/pages/node

View file

@ -103,7 +103,7 @@ type Props = RouteComponentProps<{ id: string }> &
const NodePage: FC<Props> = observer((props) => {
const id = useNodePageParams();
const { node, isLoading, update, lastSeen } = useLoadNode(
const { node, isLoading, update, lastSeen, backlinks } = useLoadNode(
parseInt(id, 10),
props.fallbackData,
);
@ -133,7 +133,12 @@ const NodePage: FC<Props> = observer((props) => {
}
return (
<NodeContextProvider node={node} isLoading={isLoading} update={update}>
<NodeContextProvider
node={node}
isLoading={isLoading}
update={update}
backlinks={backlinks}
>
<NodeRelatedProvider id={parseInt(id, 10)} tags={node.tags}>
<CommentContextProvider
onSaveComment={onSaveComment}