diff --git a/pkg/interface/src/views/apps/launch/components/Groups.tsx b/pkg/interface/src/views/apps/launch/components/Groups.tsx index ce2e25c599..a4f3f574d5 100644 --- a/pkg/interface/src/views/apps/launch/components/Groups.tsx +++ b/pkg/interface/src/views/apps/launch/components/Groups.tsx @@ -50,6 +50,14 @@ export default function Groups(props: GroupsProps & Parameters[0]) { .sort(sortGroupsAlph) .sort(sortGroupsRecent(recentGroups)) + const acceptInvite = (invite) => { + const [, , ship, name] = invite.path.split('/'); + const resource = { ship, name }; + return api.contacts.join(resource).then(() => { + api.invite.accept('/contacts', getKeyByValue(invites['/contacts'], invite)); + }); + }; + return ( [0]) { {invite.path.slice(6)} api.invite.accept('/contacts', getKeyByValue(invites['/contacts'], invite))} + onClick={() => acceptInvite(invite)} color='blue' mr='2' cursor='pointer'>