Update currentTeam after delete on team details page (#8619)

This commit is contained in:
Luke Heath 2022-11-08 15:11:23 -06:00 committed by GitHub
parent a9761a1a99
commit 52dea440cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -289,6 +289,7 @@ const TeamDetailsWrapper = ({
try {
await teamsAPI.destroy(currentTeam.id);
renderFlash("success", "Team removed");
setCurrentTeam(undefined);
return router.push(PATHS.ADMIN_TEAMS);
} catch (response) {
renderFlash("error", "Something went wrong removing the team");