()
| 19 | }; |
| 20 | |
| 21 | export const NavJson: NoPropComponent = (): any => { |
| 22 | const rootNode = useRootNode(); |
| 23 | const pageNode = usePageNode(); |
| 24 | const isSingle = useIsSingle(); |
| 25 | |
| 26 | return ( |
| 27 | <code |
| 28 | dangerouslySetInnerHTML={{ |
| 29 | __html: JSON.stringify(getNav(rootNode, pageNode, isSingle)), |
| 30 | }} |
| 31 | /> |
| 32 | ); |
| 33 | }; |
| 34 | |
| 35 | const getNav = (node: Node, pageNode: Node, isSingle: boolean): NavNode => { |
| 36 | const navNode: NavNode = { |
nothing calls this directly
no test coverage detected
searching dependent graphs…