MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / positionBelow

Function positionBelow

packages/react/src/pages/policies.tsx:424–432  ·  view source on GitHub ↗
(id: string, owner: Owner)

Source from the content-addressed store, hash-verified

422 : generateKeyBetween(committed[j - 2]!.position, committed[j - 1]!.position);
423 };
424 const positionBelow = (id: string, owner: Owner): string => {
425 const committed = committedForOwner(owner);
426 const j = committedIndex(id, owner);
427 if (j === -1 || j >= committed.length - 1)
428 return generateKeyBetween(committed[committed.length - 1]!.position, null);
429 return j === committed.length - 2
430 ? generateKeyBetween(committed[committed.length - 1]!.position, null)
431 : generateKeyBetween(committed[j + 1]!.position, committed[j + 2]!.position);
432 };
433 return (
434 <CardStack>
435 <CardStackHeader>Active policies</CardStackHeader>

Callers 1

PoliciesPageFunction · 0.85

Calls 2

committedForOwnerFunction · 0.85
committedIndexFunction · 0.85

Tested by

no test coverage detected