From c16f2f14ebe11810adc36ad07a41ec8c84faeb58 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 30 Mar 2024 12:04:58 -0700 Subject: [PATCH] (ui) edit teams --- ui/litellm-dashboard/src/components/teams.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/litellm-dashboard/src/components/teams.tsx b/ui/litellm-dashboard/src/components/teams.tsx index c654dc4e6..9ef093ff5 100644 --- a/ui/litellm-dashboard/src/components/teams.tsx +++ b/ui/litellm-dashboard/src/components/teams.tsx @@ -166,17 +166,16 @@ const handleEditSubmit = async (formValues: Record) => { return; } + let newTeamValues = await teamUpdateCall(accessToken, formValues); + // Update the teams state with the updated team data if (teams) { const updatedTeams = teams.map((team) => - team.team_id === teamId ? formValues : team + team.team_id === teamId ? newTeamValues.data : team ); setTeams(updatedTeams); } - - console.log("Editing team:", teamId, "with values:", formValues); message.success("Team updated successfully"); - teamUpdateCall(accessToken, formValues); setEditModalVisible(false); setSelectedTeam(null);