diff --git a/pkg/interface/src/views/apps/links/components/LinkBlocks.tsx b/pkg/interface/src/views/apps/links/components/LinkBlocks.tsx index 106fd7a8c2..ba24a37d66 100644 --- a/pkg/interface/src/views/apps/links/components/LinkBlocks.tsx +++ b/pkg/interface/src/views/apps/links/components/LinkBlocks.tsx @@ -8,7 +8,7 @@ import { LinkBlockInput } from './LinkBlockInput'; import useLocalState from '~/logic/state/local'; import BigIntOrderedMap from '@urbit/api/lib/BigIntOrderedMap'; import bigInt from 'big-integer'; -import VirtualScroller from '~/views/components/VirtualScroller'; +import { BlockScroller } from '~/views/components/BlockScroller'; export interface LinkBlocksProps { graph: Graph; @@ -102,7 +102,7 @@ export function LinkBlocks(props: LinkBlocksProps) { return ( - , + 'keyEq' | 'keyToString' | 'keyBunt' +>; + +const keyEq = (a: BigInteger, b: BigInteger) => a.eq(b); +const keyToString = (a: BigInteger) => a.toString(); + +export const BlockScroller = React.forwardRef< + VirtualScroller, + BlockScrollerProps +>((props, ref) => { + return ( + + ref={ref} + {...props} + keyEq={keyEq} + keyToString={keyToString} + keyBunt={bigInt.zero} + /> + ); +});