Skip to content

Commit f70521d

Browse files
committed
add insight filter selection to webhook creation and update
1 parent bd3d645 commit f70521d

File tree

8 files changed

+1282
-485
lines changed

8 files changed

+1282
-485
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/create-webhook-config-modal.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ThirdwebClient } from "thirdweb";
12
import type { Topic } from "@/api/webhook-configs";
23
import { WebhookConfigModal } from "./webhook-config-modal";
34

@@ -7,15 +8,19 @@ interface CreateWebhookConfigModalProps {
78
teamSlug: string;
89
projectSlug: string;
910
topics: Topic[];
11+
client?: ThirdwebClient;
12+
supportedChainIds?: Array<number>;
1013
}
1114

1215
export function CreateWebhookConfigModal(props: CreateWebhookConfigModalProps) {
1316
return (
1417
<WebhookConfigModal
18+
client={props.client}
1519
mode="create"
1620
onOpenChange={props.onOpenChange}
1721
open={props.open}
1822
projectSlug={props.projectSlug}
23+
supportedChainIds={props.supportedChainIds}
1924
teamSlug={props.teamSlug}
2025
topics={props.topics}
2126
/>

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/edit-webhook-config-modal.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ThirdwebClient } from "thirdweb";
12
import type { Topic, WebhookConfig } from "@/api/webhook-configs";
23
import { WebhookConfigModal } from "./webhook-config-modal";
34

@@ -8,15 +9,19 @@ interface EditWebhookConfigModalProps {
89
projectSlug: string;
910
topics: Topic[];
1011
webhookConfig: WebhookConfig;
12+
client?: ThirdwebClient;
13+
supportedChainIds?: Array<number>;
1114
}
1215

1316
export function EditWebhookConfigModal(props: EditWebhookConfigModalProps) {
1417
return (
1518
<WebhookConfigModal
19+
client={props.client}
1620
mode="edit"
1721
onOpenChange={props.onOpenChange}
1822
open={props.open}
1923
projectSlug={props.projectSlug}
24+
supportedChainIds={props.supportedChainIds}
2025
teamSlug={props.teamSlug}
2126
topics={props.topics}
2227
webhookConfig={props.webhookConfig}

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/components/overview.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import { redirect } from "next/navigation";
4+
import type { ThirdwebClient } from "thirdweb";
45
import type { Topic, WebhookConfig } from "@/api/webhook-configs";
56
import type { WebhookSummaryStats } from "@/types/analytics";
67
import { WebhookConfigsTable } from "./webhook-configs-table";
@@ -13,6 +14,8 @@ interface WebhooksOverviewProps {
1314
webhookConfigs: WebhookConfig[];
1415
topics: Topic[];
1516
metricsMap: Map<string, WebhookSummaryStats | null>;
17+
client?: ThirdwebClient;
18+
supportedChainIds?: Array<number>;
1619
}
1720

1821
export function WebhooksOverview({
@@ -23,6 +26,8 @@ export function WebhooksOverview({
2326
webhookConfigs,
2427
topics,
2528
metricsMap,
29+
client,
30+
supportedChainIds,
2631
}: WebhooksOverviewProps) {
2732
// Feature is enabled (matches server component behavior)
2833
const isFeatureEnabled = true;
@@ -35,9 +40,11 @@ export function WebhooksOverview({
3540
// Show full webhook functionality
3641
return (
3742
<WebhookConfigsTable
43+
client={client}
3844
metricsMap={metricsMap}
3945
projectId={projectId}
4046
projectSlug={projectSlug}
47+
supportedChainIds={supportedChainIds}
4148
teamId={teamId}
4249
teamSlug={teamSlug}
4350
topics={topics}

0 commit comments

Comments
 (0)