fixed refreshing team data after edit (#4111)

This commit is contained in:
Martavis Parker 2022-02-09 09:05:25 -08:00 committed by GitHub
parent cc52843921
commit 67b805ac39
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -300,6 +300,7 @@ const TeamDetailsWrapper = ({
.then(() => {
dispatch(teamActions.loadAll({ perPage: 500 }));
dispatch(renderFlash("success", "Team updated"));
refetchTeams();
// TODO: error handling
})
.catch(() => null);
@ -349,7 +350,6 @@ const TeamDetailsWrapper = ({
);
}
// const hostsCount = currentTeam.host_count;
const hostsCount = teams?.length || 1;
const hostsTotalDisplay = hostsCount === 1 ? "1 host" : `${hostsCount} hosts`;
const userAdminTeams = userTeams.filter(