group update
This commit is contained in:
@@ -3,15 +3,18 @@ import GroupItem from "./GroupItem";
|
||||
import { cn } from "../../../lib/cn";
|
||||
import { ChevroneDown } from "../../../assets/icons/groups";
|
||||
import { Group } from "../../../redux/slices/groups";
|
||||
import { GroupUpdate } from "./Groups";
|
||||
|
||||
interface GroupsBlockProps {
|
||||
groups: Group[];
|
||||
title: string;
|
||||
className?: string;
|
||||
setUpdateActive: (value: any) => void;
|
||||
setUpdateGroup: (value: GroupUpdate) => void;
|
||||
}
|
||||
|
||||
|
||||
const GroupsBlock: FC<GroupsBlockProps> = ({ groups, title, className }) => {
|
||||
const GroupsBlock: FC<GroupsBlockProps> = ({ groups, title, className, setUpdateActive, setUpdateGroup }) => {
|
||||
|
||||
|
||||
const [active, setActive] = useState<boolean>(title != "Скрытые");
|
||||
@@ -40,7 +43,15 @@ const GroupsBlock: FC<GroupsBlockProps> = ({ groups, title, className }) => {
|
||||
|
||||
<div className="grid grid-cols-3 gap-[20px] pt-[20px] pb-[20px] box-border">
|
||||
{
|
||||
groups.map((v, i) => <GroupItem key={i} id={v.id} visible={true} role={"owner"} name={v.name}/>)
|
||||
groups.map((v, i) => <GroupItem
|
||||
key={i}
|
||||
id={v.id}
|
||||
visible={true}
|
||||
description={v.description}
|
||||
setUpdateActive={setUpdateActive}
|
||||
setUpdateGroup={setUpdateGroup}
|
||||
role={"owner"}
|
||||
name={v.name}/>)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user