Invalidate hasTeamPlan when the last team is removed (#6837)
parent
ef78db7856
commit
831aa72d23
|
@ -29,6 +29,7 @@ export default function TeamList(props: Props) {
|
||||||
const deleteTeamMutation = trpc.viewer.teams.delete.useMutation({
|
const deleteTeamMutation = trpc.viewer.teams.delete.useMutation({
|
||||||
async onSuccess() {
|
async onSuccess() {
|
||||||
await utils.viewer.teams.list.invalidate();
|
await utils.viewer.teams.list.invalidate();
|
||||||
|
await utils.viewer.teams.hasTeamPlan.invalidate();
|
||||||
},
|
},
|
||||||
async onError(err) {
|
async onError(err) {
|
||||||
showToast(err.message, "error");
|
showToast(err.message, "error");
|
||||||
|
|
Loading…
Reference in New Issue