MCPcopy Index your code
hub / github.com/tinyplex/tinybase / RelationshipsView

Function RelationshipsView

src/ui-react-inspector/RelationshipsView.tsx:42–67  ·  view source on GitHub ↗
({
  relationshipsId,
  s,
}: {readonly relationshipsId?: Id} & StoreProp)

Source from the content-addressed store, hash-verified

40};
41
42export const RelationshipsView = ({
43 relationshipsId,
44 s,
45}: {readonly relationshipsId?: Id} & StoreProp) => {
46 const relationships = useRelationships(relationshipsId);
47 const relationshipIds = useRelationshipIds(relationships);
48 return isUndefined(relationships) ? null : (
49 <Details
50 uniqueId={getUniqueId('r', relationshipsId)}
51 title={'Relationships: ' + (relationshipsId ?? DEFAULT)}
52 s={s}
53 >
54 {arrayIsEmpty(relationshipIds)
55 ? 'No relationships defined'
56 : sortedIdsMap(relationshipIds, (relationshipId) => (
57 <RelationshipView
58 relationships={relationships}
59 relationshipsId={relationshipsId}
60 relationshipId={relationshipId}
61 s={s}
62 key={relationshipId}
63 />
64 ))}
65 </Details>
66 );
67};

Callers

nothing calls this directly

Calls 6

useRelationshipsFunction · 0.90
useRelationshipIdsFunction · 0.90
isUndefinedFunction · 0.90
getUniqueIdFunction · 0.90
arrayIsEmptyFunction · 0.90
sortedIdsMapFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…