From 51eb54954f7955d8a3e9100d7ffc88882a05d5be Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Sat, 4 Mar 2023 12:10:09 +0100 Subject: [PATCH] Adding a check for existing accounts --- src/components/invitation/Invitation.tsx | 28 +++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/components/invitation/Invitation.tsx b/src/components/invitation/Invitation.tsx index 4a77fc0..add370c 100644 --- a/src/components/invitation/Invitation.tsx +++ b/src/components/invitation/Invitation.tsx @@ -28,6 +28,7 @@ const fetchInvitation = () => { params: { id: invitation().data.id }, }).then((account) => { console.log({ caller: 'Invitation / fetchInvitation', account }); + setInvitation({ ...invitation(), existing: true }); }); }) .catch((error) => { @@ -102,7 +103,7 @@ const Invitation: Component = (props) => { }; const handleModalFailureClose = () => { - setInvitation({ ...invitation(), failure: undefined }); + setInvitation({ ...invitation(), failure: undefined, existing: undefined }); }; const handleCloseAll = () => { @@ -191,6 +192,31 @@ const Invitation: Component = (props) => { > C'est tout bon ! + {' '} + + + + Ce compte est déjà configuré, vous pouvez soit continuer et le + reconfigurer soit abandonner cette action et ne pas tenir compte du + massage qui vous a été envoyé. + + );