auth + groups invite

This commit is contained in:
Виталий Лавшонок
2025-11-15 17:37:47 +03:00
parent ded41ba7f0
commit dfc2985209
16 changed files with 673 additions and 225 deletions

View File

@@ -3,7 +3,7 @@ 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';
import { GroupInvite, GroupUpdate } from './Groups';
interface GroupsBlockProps {
groups: Group[];
@@ -11,6 +11,9 @@ interface GroupsBlockProps {
className?: string;
setUpdateActive: (value: any) => void;
setUpdateGroup: (value: GroupUpdate) => void;
setInviteActive: (value: any) => void;
setInviteGroup: (value: GroupInvite) => void;
type: 'manage' | 'member';
}
const GroupsBlock: FC<GroupsBlockProps> = ({
@@ -19,6 +22,9 @@ const GroupsBlock: FC<GroupsBlockProps> = ({
className,
setUpdateActive,
setUpdateGroup,
setInviteActive,
setInviteGroup,
type,
}) => {
const [active, setActive] = useState<boolean>(title != 'Скрытые');
@@ -63,8 +69,11 @@ const GroupsBlock: FC<GroupsBlockProps> = ({
description={v.description}
setUpdateActive={setUpdateActive}
setUpdateGroup={setUpdateGroup}
setInviteActive={setInviteActive}
setInviteGroup={setInviteGroup}
role={'owner'}
name={v.name}
type={type}
/>
))}
</div>