Update WebhookListContainer.tsx

pull/3569/head
zomars 2022-07-29 21:01:13 -06:00
parent 95a0496f32
commit 920050022a
1 changed files with 3 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { useRouter } from "next/router";
import { useState } from "react"; import { useState } from "react";
import { trpc } from "@calcom/trpc/react"; import { trpc } from "@calcom/trpc/react";
@ -21,10 +22,12 @@ export type WebhookListContainerType = {
}; };
export default function WebhookListContainer(props: WebhookListContainerType) { export default function WebhookListContainer(props: WebhookListContainerType) {
const router = useRouter();
const query = trpc.useQuery( const query = trpc.useQuery(
["viewer.webhook.list", { eventTypeId: props.eventTypeId, appId: props.appId }], ["viewer.webhook.list", { eventTypeId: props.eventTypeId, appId: props.appId }],
{ {
suspense: true, suspense: true,
enabled: router.isReady,
} }
); );
const [newWebhookModal, setNewWebhookModal] = useState(false); const [newWebhookModal, setNewWebhookModal] = useState(false);