fix: refetch issues
This commit is contained in:
@@ -20,13 +20,12 @@ export function WebhookIntegrationForm({
|
||||
defaultValues?: RouterOutputs['integration']['get'];
|
||||
onSuccess: () => void;
|
||||
}) {
|
||||
const { organizationId, projectId } = useAppParams();
|
||||
const { organizationId } = useAppParams();
|
||||
const form = useForm<IForm>({
|
||||
defaultValues: mergeDeepRight(
|
||||
{
|
||||
id: defaultValues?.id,
|
||||
organizationId,
|
||||
projectId,
|
||||
config: {
|
||||
type: 'webhook' as const,
|
||||
url: '',
|
||||
|
||||
@@ -51,7 +51,11 @@ export function RuleCard({
|
||||
trpc.notification.deleteRule.mutationOptions({
|
||||
onSuccess() {
|
||||
toast.success('Rule deleted');
|
||||
client.refetchQueries(trpc.notification.rules.pathFilter());
|
||||
client.refetchQueries(
|
||||
trpc.notification.rules.queryOptions({
|
||||
projectId: rule.projectId,
|
||||
}),
|
||||
);
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user