Update route check and add PageBody wrapper
Updated the `isRouteActive` check in the sidebar component to ensure it doesn't falsely identify nested routes as active. Additionally, introduced a `PageBody` wrapper in the account page component for consistent styling and padding.
This commit is contained in:
@@ -159,7 +159,7 @@ export function SidebarItem({
|
||||
const { collapsed } = useContext(SidebarContext);
|
||||
const currentPath = usePathname() ?? '';
|
||||
|
||||
const active = isRouteActive(path, currentPath, end);
|
||||
const active = isRouteActive(path, currentPath, end ?? false);
|
||||
const variant = active ? 'secondary' : 'ghost';
|
||||
const size = collapsed ? 'icon' : 'sm';
|
||||
|
||||
@@ -254,4 +254,4 @@ export function SidebarNavigation({
|
||||
})}
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user