Skip to content

Commit 328576f

Browse files
claude[bot]AprilNEA
andcommitted
fix: add active state to secondary menu items
Secondary menu items (sub-items) in the sidebar now properly show their active state when selected. - Added `isActive={pathname === href}` prop to `SidebarMenuSubButton` component - Fixes issue where TOTP Debugger and other secondary menu items didn't indicate selection - Follows existing pattern used for regular menu items Fixes #34 Co-authored-by: AprilNEA <[email protected]>
1 parent 5422e41 commit 328576f

File tree

1 file changed

+4
-1
lines changed
  • packages/frontend/src/components/sidebar

1 file changed

+4
-1
lines changed

packages/frontend/src/components/sidebar/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ export default function AppSidebar({
176176
const href = `/${category.key}/${item.key}/${subItem.key}`;
177177
return (
178178
<SidebarMenuSubItem key={subItem.key}>
179-
<SidebarMenuSubButton asChild>
179+
<SidebarMenuSubButton
180+
asChild
181+
isActive={pathname === href}
182+
>
180183
<Link
181184
href={href}
182185
onClick={() => {

0 commit comments

Comments
 (0)