From 52dea440cf2a80a538e705a142e9972d25d395ce Mon Sep 17 00:00:00 2001 From: Luke Heath Date: Tue, 8 Nov 2022 15:11:23 -0600 Subject: [PATCH] Update currentTeam after delete on team details page (#8619) --- .../TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx index 12fa97b7c..1230034fb 100644 --- a/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx +++ b/frontend/pages/admin/TeamManagementPage/TeamDetailsWrapper/TeamDetailsWrapper.tsx @@ -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");