fixed reload after disband team (#823)

pull/825/head
Syed Ali Shahbaz 2021-09-29 22:34:47 +05:30 committed by GitHub
parent 079a920c2c
commit 5318047794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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 (