Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: closed group membership fixes #1408

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading