mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +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 { useState } from 'react';
|
||||||
import { inviteMember, getUserByEmail } from '@pathfinder/data-services';
|
import { inviteMember, getUserByEmail } from '@pathfinder/data-services';
|
||||||
import { Avatar } from '@mui/material';
|
import { Avatar } from '@mui/material';
|
||||||
|
import { toast } from '@/ui/toast';
|
||||||
interface LoginModalProps {
|
interface LoginModalProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
@@ -122,11 +122,13 @@ export const InviteMembers = ({
|
|||||||
shape="circle"
|
shape="circle"
|
||||||
type="primary"
|
type="primary"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
console.log(workSpaceId);
|
||||||
inviteMember({ id: workSpaceId, email: email })
|
inviteMember({ id: workSpaceId, email: email })
|
||||||
.then(res => {
|
.then(() => {
|
||||||
console.log(res);
|
onClose();
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
toast('Invite failed');
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user