trying to fix issues with keyboard shortcut

This commit is contained in:
Arjun Patel
2022-01-15 14:49:23 -08:00
parent 74f8c40e45
commit e2972e8ed0
2 changed files with 107 additions and 21 deletions
+8 -6
View File
@@ -99,23 +99,25 @@ function TeamAdmin() {
}
try {
const team = new Team();
team.name = teamName;
team.createdByUserId = user.id;
team.status = TeamStatus.created;
const updatedTeam = new Team();
updatedTeam.id = team.id;
updatedTeam.name = teamName;
updatedTeam.createdByUserId = user.id;
updatedTeam.status = TeamStatus.created;
if (companySite != initialSite) {
// make sure to put null in database for the team
team.companySite = companySite;
updatedTeam.companySite = companySite;
}
// update team name and company site if it changed
await teamService.updateTeam(team);
await teamService.updateTeam(updatedTeam);
// take user back to team dashboard
router.push("/teams/" + team.id);
} catch (error) {
setError(error.message);
console.log(error);
}
setLoading(false);