fix: group (#4330)

This commit is contained in:
Finley Ge
2025-03-26 11:48:58 +08:00
committed by archer
parent dd2f7bdcfd
commit a17623d4ea
2 changed files with 5 additions and 3 deletions

View File

@@ -2,7 +2,6 @@ import { Input, HStack, ModalBody, Button, ModalFooter } from '@chakra-ui/react'
import MyModal from '@fastgpt/web/components/common/MyModal';
import Avatar from '@fastgpt/web/components/common/Avatar';
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
import { useTranslation } from 'next-i18next';
import React from 'react';
import { useSelectFile } from '@/web/common/file/hooks/useSelectFile';

View File

@@ -42,12 +42,10 @@ export type GroupFormType = {
// 3. Owner can add/remove admins
function GroupEditModal({
onClose,
editGroupId,
group,
onSuccess
}: {
onClose: () => void;
editGroupId?: string;
group: MemberGroupListItemType<true>;
onSuccess: () => void;
}) {
@@ -61,10 +59,15 @@ function GroupEditModal({
const selectedMembersRef = useRef<HTMLDivElement>(null);
const [members, setMembers] = useState<GroupMemberItemType[]>([]);
const editGroupId = useMemo(() => {
return group?._id;
}, [group]);
useMount(async () => {
console.log('aaaaaa');
if (editGroupId) {
const data = await getGroupMembers(editGroupId);
console.log(data);
setMembers(data);
}
});