Fix/company team crud (#2614)

* Fixed basePathToShowPage

* Fixed company team list

* Fixed : create, update, delete and detach people from company.
This commit is contained in:
Lucas Bordeau
2023-11-21 12:24:20 +01:00
committed by GitHub
parent 6f4a952381
commit b13d84fcda
9 changed files with 163 additions and 92 deletions

View File

@ -23,7 +23,7 @@ export type MenuItemProps = {
isTooltipOpen?: boolean;
className?: string;
testId?: string;
onClick?: () => void;
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
};
export const MenuItem = ({
@ -38,10 +38,17 @@ export const MenuItem = ({
}: MenuItemProps) => {
const showIconButtons = Array.isArray(iconButtons) && iconButtons.length > 0;
const handleMenuItemClick = (event: MouseEvent<HTMLLIElement>) => {
event.preventDefault();
event.stopPropagation();
onClick?.(event);
};
return (
<StyledHoverableMenuItemBase
data-testid={testId ?? undefined}
onClick={onClick}
onClick={handleMenuItemClick}
className={className}
accent={accent}
isMenuOpen={!!isTooltipOpen}