diff --git a/src/components/invitation/Invitation.tsx b/src/components/invitation/Invitation.tsx index add370c..7b3e1bc 100644 --- a/src/components/invitation/Invitation.tsx +++ b/src/components/invitation/Invitation.tsx @@ -90,6 +90,11 @@ const Invitation: Component = (props) => { mail: user.mail, }; dispatch({ action: 'putAccount', params: { id, account } }); + const settings: any = await dispatch({ action: 'getSettings' }); + dispatch({ + action: 'putSettings', + params: { settings: { ...settings, currentAccountId: id } }, + }); } catch (error) { setInvitation({ ...invitation(), @@ -106,8 +111,9 @@ const Invitation: Component = (props) => { setInvitation({ ...invitation(), failure: undefined, existing: undefined }); }; - const handleCloseAll = () => { + const handleCloseSuccess = () => { setInvitation(false); + location.reload(); }; return ( @@ -146,7 +152,7 @@ const Invitation: Component = (props) => { - @@ -174,7 +180,7 @@ const Invitation: Component = (props) => { {' '}