MCPcopy Create free account
hub / github.com/tinyplex/tinybase / SiteNodeSection

Function SiteNodeSection

site/ui/SiteNodeSection.tsx:80–111  ·  view source on GitHub ↗
({
  node,
  summary = false,
})

Source from the content-addressed store, hash-verified

78};
79
80export const SiteNodeSection: FunctionComponent<Props> = ({
81 node,
82 summary = false,
83}) => {
84 const isSingle = useIsSingle();
85 if (node.reflection != null) {
86 return summary && !isSingle ? (
87 <SiteReflectionSummary node={node} />
88 ) : (
89 <NodeSection node={node} summary={summary} />
90 );
91 }
92
93 const children = getSkippedChildren(node);
94 return isSingle || !summary ? (
95 <SiteNodeSectionBlock node={node}>
96 {children.map((child, key) => (
97 <SiteNodeSection node={child} key={key} summary={true} />
98 ))}
99 </SiteNodeSectionBlock>
100 ) : (
101 <SiteNodeSectionBlock node={node} summary={true}>
102 {children.length == 0 ? null : (
103 <ul>
104 {children.map((child, key) => (
105 <SiteNodeSectionItem key={key} node={child} />
106 ))}
107 </ul>
108 )}
109 </SiteNodeSectionBlock>
110 );
111};
112
113const SiteReflectionSummary: FunctionComponent<{readonly node: Node}> = ({
114 node,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…