mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
feat: invite member and delete console
This commit is contained in:
@@ -6,7 +6,7 @@ import Input from '@/ui/input';
|
||||
import { useState } from 'react';
|
||||
import { inviteMember, getUserByEmail } from '@pathfinder/data-services';
|
||||
import { Avatar } from '@mui/material';
|
||||
|
||||
import { toast } from '@/ui/toast';
|
||||
interface LoginModalProps {
|
||||
open: boolean;
|
||||
onClose: () => void;
|
||||
@@ -122,11 +122,13 @@ export const InviteMembers = ({
|
||||
shape="circle"
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
console.log(workSpaceId);
|
||||
inviteMember({ id: workSpaceId, email: email })
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
.then(() => {
|
||||
onClose();
|
||||
})
|
||||
.catch(err => {
|
||||
toast('Invite failed');
|
||||
console.log(err);
|
||||
});
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user