From 4907169cfb997fe8b65e6c9dfe1fa8378c623d2a Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 1 Apr 2022 18:04:13 -0700 Subject: [PATCH] fix: Hint when all invites were not sent closes #3317 --- app/scenes/Invite.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/scenes/Invite.tsx b/app/scenes/Invite.tsx index 3e6fd0ca0..544e7f534 100644 --- a/app/scenes/Invite.tsx +++ b/app/scenes/Invite.tsx @@ -65,11 +65,18 @@ function Invite({ onSubmit }: Props) { setIsSaving(true); try { - await users.invite(invites); + const data = await users.invite(invites); onSubmit(); - showToast(t("We sent out your invites!"), { - type: "success", - }); + + if (data.sent.length > 0) { + showToast(t("We sent out your invites!"), { + type: "success", + }); + } else { + showToast(t("Those email addresses are already invited"), { + type: "success", + }); + } } catch (err) { showToast(err.message, { type: "error",