MCPcopy Create free account
hub / github.com/fontsource/fontsource / activeRootFolder

Function activeRootFolder

website/app/components/docs/LeftSidebar.tsx:50–55  ·  view source on GitHub ↗
(tree: PageTree.Root, currentPath: string)

Source from the content-addressed store, hash-verified

48};
49
50const activeRootFolder = (tree: PageTree.Root, currentPath: string) => {
51 return tree.children.find(
52 (node): node is PageTree.Folder =>
53 node.type === 'folder' && containsCurrentPage(node, currentPath),
54 );
55};
56
57const firstInternalPageUrl = (node: PageTree.Node): string | undefined => {
58 if (node.type === 'page') return node.external ? undefined : node.url;

Callers 1

LeftSidebarFunction · 0.85

Calls 1

containsCurrentPageFunction · 0.85

Tested by

no test coverage detected