fix: Fix tables + add open navigation

This commit is contained in:
2025-06-15 15:03:36 +03:00
parent 2117a6836e
commit 481385c2f4
4 changed files with 74 additions and 59 deletions

View File

@ -16,6 +16,7 @@ interface NavigationItemProps {
open: boolean;
onClick?: () => void;
isNested?: boolean;
onDrawerOpen?: () => void;
}
export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
@ -23,6 +24,7 @@ export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
open,
onClick,
isNested = false,
onDrawerOpen,
}) => {
const Icon = item.icon;
const navigate = useNavigate();
@ -32,6 +34,9 @@ export const NavigationItemComponent: React.FC<NavigationItemProps> = ({
const isActive = item.path ? location.pathname.startsWith(item.path) : false;
const handleClick = () => {
if (item.id === "all" && !open) {
onDrawerOpen?.();
}
if (item.nestedItems) {
setIsExpanded(!isExpanded);
} else if (onClick) {