From b8d99b3ecb64e9a412d69d1096e358975cbe8d8f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 1 Oct 2020 11:14:18 +0300 Subject: [PATCH] Invitations: add a confirmation dialog after an invite has been sent. --- src/Collections/CollectionMembers.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Collections/CollectionMembers.tsx b/src/Collections/CollectionMembers.tsx index 3e18368..64619b6 100644 --- a/src/Collections/CollectionMembers.tsx +++ b/src/Collections/CollectionMembers.tsx @@ -32,6 +32,7 @@ export default function CollectionMembers(props: PropsType) { const [members, setMembers] = React.useState(); const [revokeUser, setRevokeUser] = React.useState(null); const [addMemberOpen, setAddMemberOpen] = React.useState(false); + const [inviteSuccessOpen, setInviteSuccessOpen] = React.useState(false); const [error, setError] = React.useState(); const { collection, metadata } = props.collection; @@ -77,6 +78,7 @@ export default function CollectionMembers(props: PropsType) { await inviteMgr.invite(collection, username, pubkey, accessLevel); await fetchMembers(); setAddMemberOpen(false); + setInviteSuccessOpen(true); } return ( @@ -147,6 +149,17 @@ export default function CollectionMembers(props: PropsType) { onClose={() => setAddMemberOpen(false)} /> } + + setInviteSuccessOpen(false)} + > +

+ Invitation sent. User will be added once the invitation has been accepted. +

+
); }