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.

fix webhook icon

Steven Tey4a893d0ca27d
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
index 9e42daf6d3..65507ab044 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/layout-client.tsx
@@ -14,8 +14,8 @@ import {
ShieldCheck,
Tag,
Users6,
+ Webhook,
} from "@dub/ui/src/icons";
-import { Webhook } from "lucide-react";
import { ReactNode, useMemo } from "react";
export default function WorkspaceSettingsLayoutClient({
diff --git a/apps/web/ui/modals/link-builder/index.tsx b/apps/web/ui/modals/link-builder/index.tsx
index 4c83f90107..5f13a7a582 100644
--- a/apps/web/ui/modals/link-builder/index.tsx
+++ b/apps/web/ui/modals/link-builder/index.tsx
@@ -112,6 +112,7 @@ function LinkBuilderInner({
plan,
nextPlan,
logo,
+ flags,
conversionEnabled,
} = useWorkspace();
@@ -468,12 +469,12 @@ function LinkBuilderInner({
<div className="flex items-center justify-between gap-2 border-t border-gray-100 bg-gray-50 p-4">
<div className="flex min-w-0 items-center gap-2">
<UTMButton />
- <WebhookSelect />
<div className="flex items-center gap-2 max-sm:hidden">
<ExpirationButton />
<TargetingButton />
<PasswordButton />
</div>
+ {flags?.webhooks && <WebhookSelect />}
<MoreDropdown />
</div>
{homepageDemo ? (
@@ -570,7 +571,6 @@ export function useLinkBuilder({
duplicateProps?: LinkWithTagsProps;
homepageDemo?: boolean;
} = {}) {
- const { flags } = useWorkspace();
const [showLinkBuilder, setShowLinkBuilder] = useState(false);
const LinkBuilderCallback = useCallback(() => {
diff --git a/apps/web/ui/modals/link-builder/webhook-select.tsx b/apps/web/ui/modals/link-builder/webhook-select.tsx
index ee4fb440dc..93ebae002b 100644
--- a/apps/web/ui/modals/link-builder/webhook-select.tsx
+++ b/apps/web/ui/modals/link-builder/webhook-select.tsx
@@ -1,7 +1,6 @@
import useWebhooks from "@/lib/swr/use-webhooks";
-import { Combobox, useKeyboardShortcut } from "@dub/ui";
+import { Combobox, useKeyboardShortcut, Webhook } from "@dub/ui";
import { cn } from "@dub/utils";
-import { Webhook } from "lucide-react";
import { useMemo, useState } from "react";
import { useFormContext } from "react-hook-form";
import { LinkFormData } from ".";
@@ -23,7 +22,7 @@ export function WebhookSelect() {
linkLevelWebhooks?.map((webhook) => ({
label: webhook.name,
value: webhook.id,
- icon: <Webhook className="size-4" />,
+ icon: <Webhook className="size-3.5" />,
})),
[availableWebhooks],
);
@@ -55,10 +54,13 @@ export function WebhookSelect() {
options={options}
icon={
<Webhook
- className={cn("size-4", hasSelectedWebhooks && "text-blue-500")}
+ className={cn(
+ "size-3.5 flex-none",
+ hasSelectedWebhooks && "text-blue-500",
+ )}
/>
}
- side="bottom"
+ side="top"
placeholder="Webhooks"
searchPlaceholder="Search webhooks..."
shortcutHint="W"
diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.ts
index 4da0c8279b..c12839946f 100644
--- a/packages/ui/src/icons/nucleo/index.ts
+++ b/packages/ui/src/icons/nucleo/index.ts
@@ -101,6 +101,7 @@ export * from "./user-check";
export * from "./users";
export * from "./users6";
export * from "./watch";
+export * from "./webhook";
export * from "./window";
export * from "./window-search";
export * from "./window-settings";
diff --git a/packages/ui/src/icons/nucleo/webhook.tsx b/packages/ui/src/icons/nucleo/webhook.tsx
new file mode 100644
index 0000000000..e8e733819e
--- /dev/null
+++ b/packages/ui/src/icons/nucleo/webhook.tsx
@@ -0,0 +1,55 @@
+import { SVGProps } from "react";
+
+export function Webhook(props: SVGProps<SVGSVGElement>) {
+ return (
+ <svg
+ height="18"
+ width="18"
+ viewBox="0 0 18 18"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ >
+ <g fill="currentColor">
+ <path
+ d="M3.804,13.278l3.721-6.444c-.91-.515-1.524-1.492-1.524-2.613,0-1.657,1.343-3,3-3s3,1.343,3,3c0,.08-.003,.159-.009,.237"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M14.246,13.25H6.805c.009,1.046-.53,2.065-1.5,2.626-1.435,.828-3.27,.337-4.098-1.098s-.337-3.27,1.098-4.098c.069-.04,.139-.077,.21-.11"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <path
+ d="M9,4.222l3.72,6.444c.901-.531,2.054-.574,3.025-.014,1.435,.828,1.927,2.663,1.098,4.098s-2.663,1.927-4.098,1.098c-.069-.04-.136-.082-.2-.126"
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ />
+ <circle
+ cx="3.804"
+ cy="13.278"
+ fill="currentColor"
+ r="1.25"
+ stroke="none"
+ />
+ <circle cx="9" cy="4.222" fill="currentColor" r="1.25" stroke="none" />
+ <circle
+ cx="14.248"
+ cy="13.252"
+ fill="currentColor"
+ r="1.25"
+ stroke="none"
+ />
+ </g>
+ </svg>
+ );
+}