group update
This commit is contained in:
@@ -20,12 +20,17 @@ interface IconComponentProps {
|
||||
}
|
||||
|
||||
const IconComponent: React.FC<IconComponentProps> = ({
|
||||
src, onClick = () => void
|
||||
src,
|
||||
onClick
|
||||
}) => {
|
||||
|
||||
return <img
|
||||
src={src}
|
||||
onClick={() => onClick()}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
if (onClick)
|
||||
onClick();
|
||||
}}
|
||||
className="hover:bg-liquid-light rounded-[5px] cursor-pointer transition-all duration-300"
|
||||
/>
|
||||
}
|
||||
@@ -52,7 +57,8 @@ const GroupItem: React.FC<GroupItemProps> = ({
|
||||
}
|
||||
{
|
||||
(role == "menager" || role == "owner") && <IconComponent src={Edit} onClick={() => {
|
||||
setUpdateGroup({id, });
|
||||
|
||||
setUpdateGroup({id, name, description });
|
||||
setUpdateActive(true);
|
||||
}} />
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user