diff --git a/src/collaboration/components/MembershipCard.js b/src/collaboration/components/MembershipCard.js index 547143630..f14cfdae4 100644 --- a/src/collaboration/components/MembershipCard.js +++ b/src/collaboration/components/MembershipCard.js @@ -84,7 +84,7 @@ const Content = props => { ); } - if (!accountMembership && closedGroup) { + if ((!accountMembership || accountMembership.fetching) && closedGroup) { return ( { const onCompleteSuccess = useCallback( configSlug => { - navigate(`/groups/${slug}/map/${configSlug}`); + navigate(`/groups/${slug}/map/${configSlug}`, { replace: true }); }, [navigate, slug] ); diff --git a/src/group/membership/components/GroupMembers.js b/src/group/membership/components/GroupMembers.js index 573885d49..60bcb1c8c 100644 --- a/src/group/membership/components/GroupMembers.js +++ b/src/group/membership/components/GroupMembers.js @@ -70,6 +70,7 @@ const GroupMembers = () => { groupSlug: group.slug, userEmails: [membership.user.email], userRole: newRole, + membershipStatus: MEMBERSHIP_STATUS_APPROVED, }) ); }, diff --git a/src/group/membership/components/GroupMembers.test.js b/src/group/membership/components/GroupMembers.test.js index 46dd58556..ab702d097 100644 --- a/src/group/membership/components/GroupMembers.test.js +++ b/src/group/membership/components/GroupMembers.test.js @@ -388,6 +388,7 @@ test('GroupMembers: Manager actions', async () => { userEmails: ['email2@email.com'], groupSlug: 'test-group-slug', userRole: 'manager', + membershipStatus: 'APPROVED', }, } ); diff --git a/src/sharedData/visualization/components/VisualizationConfigForm/index.js b/src/sharedData/visualization/components/VisualizationConfigForm/index.js index 050033093..e6cb727a6 100644 --- a/src/sharedData/visualization/components/VisualizationConfigForm/index.js +++ b/src/sharedData/visualization/components/VisualizationConfigForm/index.js @@ -171,10 +171,13 @@ const VisualizationConfigForm = props => { setIsDirty(true); }, []); - const onCompleteSuccessWrapper = useCallback(() => { - onCompleteSuccess(visualizationConfig); - setIsDirty(false); - }, [onCompleteSuccess, visualizationConfig]); + const onCompleteSuccessWrapper = useCallback( + mapSlug => { + onCompleteSuccess(mapSlug); + setIsDirty(false); + }, + [onCompleteSuccess] + ); return ( <>