mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
feat(billing): invalidate addons query when custom domain is deleted (#39967)
This commit is contained in:
1 parent
0910908561
commit
383f00e302
1 file changed
+4
@@ -2,6 +2,7 @@ import { useMutation, UseMutationOptions, useQueryClient } from '@tanstack/react
|
||||
import { toast } from 'sonner'
|
||||
|
||||
import { del, handleError } from 'data/fetchers'
|
||||
import { subscriptionKeys } from 'data/subscriptions/keys'
|
||||
import type { ResponseError } from 'types'
|
||||
import { customDomainKeys } from './keys'
|
||||
|
||||
@@ -47,6 +48,9 @@ export const useCustomDomainDeleteMutation = ({
|
||||
}
|
||||
})
|
||||
|
||||
// Invalidate addons cache since the backend removes the addon when deleting the domain
|
||||
await queryClient.invalidateQueries({ queryKey: subscriptionKeys.addons(projectRef) })
|
||||
|
||||
await onSuccess?.(data, variables, context)
|
||||
},
|
||||
async onError(data, variables, context) {
|
||||
|
||||
Reference in new issue
Block a user