Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

700 B
Raw Blame
"use client";

import {
  InstalledIntegrationInfoProps,
  SegmentIntegrationCredentials,
} from "@/lib/types";
import { ConfigureWebhook } from "../../common/ui/configure-webhook";
import { SetWriteKey } from "./set-write-key";

export const SegmentSettings = (props: InstalledIntegrationInfoProps) => {
  const { installed, credentials, webhookId } = props;

  return (
    <>
      <SetWriteKey
        installed={!!installed?.id}
        credentials={credentials as SegmentIntegrationCredentials}
      />
      {installed && webhookId && (
        <ConfigureWebhook
          webhookId={webhookId}
          supportedEvents={["lead.created", "sale.created"]}
        />
      )}
    </>
  );
};