Invalidate hasTeamPlan when the last team is removed (#6837)

feature/date-override-all-days
Alex van Andel 2023-02-01 21:23:34 +00:00 committed by GitHub
parent ef78db7856
commit 831aa72d23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ export default function TeamList(props: Props) {
const deleteTeamMutation = trpc.viewer.teams.delete.useMutation({
async onSuccess() {
await utils.viewer.teams.list.invalidate();
await utils.viewer.teams.hasTeamPlan.invalidate();
},
async onError(err) {
showToast(err.message, "error");