({
node,
summary = false,
})
| 78 | }; |
| 79 | |
| 80 | export 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 | |
| 113 | const SiteReflectionSummary: FunctionComponent<{readonly node: Node}> = ({ |
| 114 | node, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…