Commit a17623d4 by Finley Ge Committed by archer

fix: group (#4330)

parent dd2f7bdc
......@@ -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';
......
......@@ -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);
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment