links, publish: do not visualize deleted nodes

Fixes urbit/landscape#979
This commit is contained in:
Liam Fitzgerald 2021-07-12 14:39:43 +10:00
parent 1704fe5039
commit d9c73fa457
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB
2 changed files with 5 additions and 4 deletions

View File

@ -55,8 +55,10 @@ export function LinkBlocks(props: LinkBlocksProps) {
}, [association.resource]);
const orm = useMemo(() => {
const nodes = [null, ...Array.from(props.graph)];
const graph = Array.from(props.graph).filter(
([idx, node]) => typeof node?.post !== 'string'
);
const nodes = [null, ...graph];
const chunks = _.chunk(nodes, colCount);
return new BigIntOrderedMap<[bigInt.BigInteger, GraphNode][]>().gas(
chunks.reverse().map((chunk, i) => {

View File

@ -1,7 +1,6 @@
import { Col } from '@tlon/indigo-react';
import { Graph, Group } from '@urbit/api';
import React from 'react';
import useContactState from '~/logic/state/contact';
import { NotePreview } from './NotePreview';
interface NotebookPostsProps {
@ -19,7 +18,7 @@ export function NotebookPosts(props: NotebookPostsProps) {
<Col>
{Array.from(props.graph || []).map(
([date, node]) =>
node && (
node && typeof node?.post !== 'string' && (
<NotePreview
key={date.toString()}
host={props.host}