Skip to content

Scheduling infrastructure for absolutely everyone.

fixed reload after disband team (#823)

Syed Ali Shahbaz531804779464
diff --git a/components/team/TeamList.tsx b/components/team/TeamList.tsx
index 7481a402873..6a6ae7877e2 100644
--- a/components/team/TeamList.tsx
+++ b/components/team/TeamList.tsx
@@ -18,10 +18,11 @@ export default function TeamList(props: {
}
};
- const deleteTeam = (team: Team) => {
- return fetch("/api/teams/" + team.id, {
+ const deleteTeam = async (team: Team) => {
+ await fetch("/api/teams/" + team.id, {
method: "DELETE",
- }).then(props.onChange());
+ });
+ return props.onChange();
};
return (