MCPcopy Index your code
hub / github.com/bytebase/bytebase / getItemClass

Function getItemClass

frontend/src/react/components/ProjectSidebar.tsx:58–66  ·  view source on GitHub ↗
(item: SidebarItem, currentRouteName: string)

Source from the content-addressed store, hash-verified

56// ---------------------------------------------------------------------------
57
58function getItemClass(item: SidebarItem, currentRouteName: string): string[] {
59 const isActive =
60 item.path === currentRouteName ||
61 currentRouteName.startsWith(`${item.path}.`);
62 if (isActive) {
63 return ["router-link-active", "bg-link-hover"];
64 }
65 return [];
66}
67
68// ---------------------------------------------------------------------------
69// Sidebar item list builder

Callers 3

ProjectSidebarFunction · 0.70
renderChildrenFunction · 0.70
renderItemFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected