Skip to content

Commit

Permalink
fix: closed group membership fixes (#1408)
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui authored Jan 11, 2024
1 parent c9e2409 commit 5dde36c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/collaboration/components/MembershipCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const Content = props => {
);
}

if (!accountMembership && closedGroup) {
if ((!accountMembership || accountMembership.fetching) && closedGroup) {
return (
<CardContent>
<Trans
Expand Down
2 changes: 1 addition & 1 deletion src/group/components/GroupSharedDataVisualizationConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const GroupSharedDataVisualizationConfig = () => {

const onCompleteSuccess = useCallback(
configSlug => {
navigate(`/groups/${slug}/map/${configSlug}`);
navigate(`/groups/${slug}/map/${configSlug}`, { replace: true });
},
[navigate, slug]
);
Expand Down
1 change: 1 addition & 0 deletions src/group/membership/components/GroupMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const GroupMembers = () => {
groupSlug: group.slug,
userEmails: [membership.user.email],
userRole: newRole,
membershipStatus: MEMBERSHIP_STATUS_APPROVED,
})
);
},
Expand Down
1 change: 1 addition & 0 deletions src/group/membership/components/GroupMembers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ test('GroupMembers: Manager actions', async () => {
userEmails: ['[email protected]'],
groupSlug: 'test-group-slug',
userRole: 'manager',
membershipStatus: 'APPROVED',
},
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand Down

0 comments on commit 5dde36c

Please sign in to comment.