MCPcopy Create free account
hub / github.com/Botloader/botloader / NavButton

Function NavButton

frontend/src/components/SideNav.tsx:117–131  ·  view source on GitHub ↗
({ item, children, selected }: { item: SideNavItem, children: ReactNode, selected: boolean })

Source from the content-addressed store, hash-verified

115}
116
117export function NavButton({ item, children, selected }: { item: SideNavItem, children: ReactNode, selected: boolean }) {
118 let sideNavController = UseSideNavController();
119
120 if (item.isNavLink) {
121 return <ListItemButton
122 selected={selected}
123 component={Link}
124 to={item.path}
125 onClick={() => sideNavController.close()}>
126 {children}
127 </ ListItemButton>
128 }
129
130 return <ListItemButton href={item.path}>{children}</ListItemButton>
131}

Callers

nothing calls this directly

Calls 2

UseSideNavControllerFunction · 0.90
closeMethod · 0.65

Tested by

no test coverage detected