feat: invite member and delete console

This commit is contained in:
DiamondThree
2022-12-21 14:19:57 +08:00
parent cb805a07ff
commit c4f528d07f
@@ -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);
});
}}