auth + groups invite
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user