get groups

This commit is contained in:
Виталий Лавшонок
2025-11-03 18:33:20 +03:00
parent 8429bd4082
commit f2ec4653bb
7 changed files with 355 additions and 53 deletions

View File

@@ -2,14 +2,7 @@ import { useState, FC } from "react";
import GroupItem from "./GroupItem";
import { cn } from "../../../lib/cn";
import { ChevroneDown } from "../../../assets/icons/groups";
export interface Group {
id: number;
role: "menager" | "member" | "owner" | "viewer";
visible: boolean;
name: string;
}
import { Group } from "../../../redux/slices/groups";
interface GroupsBlockProps {
groups: Group[];
@@ -47,7 +40,7 @@ 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} {...v} />)
groups.map((v, i) => <GroupItem key={i} id={v.id} visible={true} role={"owner"} name={v.name}/>)
}
</div>
</div>