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.

code improvements

Pedro Ladeirabc6bdfd20db8
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/installation-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/installation-section.tsx
index 1b378f9cfc..0e5309e6e8 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/installation-section.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/installation-section.tsx
@@ -70,9 +70,7 @@ export function InstallationSection() {
<TrackingSettingsRow
heading="Setup instructions"
description="Use the prompts and instructions to install Dub."
- leftExtra={
- ready ? <DeveloperGuides steps={setup.steps} /> : undefined
- }
+ leftExtra={ready ? <DeveloperGuides /> : undefined}
leftExtraAlign="end"
>
<SetupInstructions setup={setup} ready={ready} />
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-field.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-field.tsx
index 04eaecbbe6..e10e811f89 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-field.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-field.tsx
@@ -1,7 +1,7 @@
"use client";
import { useConfirmModal } from "@/ui/modals/confirm-modal";
-import { Button, CopyButton, Key } from "@dub/ui";
+import { Button, Copy, Key, Tick, Tooltip, useCopyToClipboard } from "@dub/ui";
import { nanoid } from "@dub/utils";
import {
EmptyTrackingCard,
@@ -20,6 +20,8 @@ export function PublishableKeyField({
disabled?: boolean;
disabledTooltip?: string;
}) {
+ const [copied, copyToClipboard] = useCopyToClipboard();
+
const generateKey = () => `dub_pk_${nanoid(24)}`;
const {
@@ -56,10 +58,20 @@ export function PublishableKeyField({
</code>
</div>
<div className="flex shrink-0 items-center gap-2">
- <CopyButton
- value={publishableKey}
- className="flex size-7 items-center justify-center rounded-lg border border-neutral-200 p-0 hover:bg-neutral-50 [&_svg]:size-3.5"
- />
+ <Tooltip content={copied ? "Key copied" : "Copy key"}>
+ <button
+ type="button"
+ onClick={() => copyToClipboard(publishableKey)}
+ className="flex size-7 shrink-0 items-center justify-center rounded-lg border border-neutral-200 p-0 transition-colors duration-150 hover:bg-neutral-50 [&_svg]:size-3.5"
+ >
+ <span className="sr-only">Copy key</span>
+ {copied ? (
+ <Tick className="text-neutral-800" />
+ ) : (
+ <Copy className="text-neutral-800" />
+ )}
+ </button>
+ </Tooltip>
<Button
text="Regenerate"
variant="secondary"
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/setup-instructions.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/setup-instructions.tsx
index ebe598bfbf..c37c20ae5c 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/setup-instructions.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/setup-instructions.tsx
@@ -14,10 +14,10 @@ import {
import {
ChatGPTIcon,
ChatTask,
- CircleDashed,
Claude,
Cursor,
Grok,
+ Layers3,
} from "@dub/ui/icons";
import { cn } from "@dub/utils";
import { useReducedMotion } from "motion/react";
@@ -110,21 +110,28 @@ function StepIcon({ step }: { step: TrackingSetupStep }) {
return <Icon className="size-5 shrink-0" />;
}
-export function DeveloperGuides({ steps }: { steps: TrackingSetupStep[] }) {
- const guides = steps.map((step) => ({
- title: step.label,
- href: step.url,
- }));
+const GENERAL_GUIDES = [
+ { title: "Dub docs", href: "https://dub.co/docs" },
+ {
+ title: "Conversion tracking guide",
+ href: "https://dub.co/docs/conversions/quickstart",
+ },
+ {
+ title: "API reference",
+ href: "https://dub.co/docs/api-reference/introduction",
+ },
+] as const;
+export function DeveloperGuides() {
return (
<div className="flex flex-col gap-1.5">
<h4 className="text-xs font-semibold leading-4 tracking-[-0.02em] text-neutral-600">
Read developer guides
</h4>
<div className="flex flex-col gap-1.5">
- {guides.map((guide) => (
+ {GENERAL_GUIDES.map((guide) => (
<Link
- key={`${guide.title}-${guide.href}`}
+ key={guide.href}
href={guide.href}
target="_blank"
rel="noopener noreferrer"
@@ -149,10 +156,10 @@ export function SetupInstructions({
if (!ready) {
return (
<div className="flex h-[114px] w-full flex-col items-center justify-center gap-2 rounded-xl bg-neutral-50 py-6">
- <CircleDashed className="size-[18px] shrink-0 text-neutral-500" />
+ <Layers3 className="size-[18px] shrink-0 text-neutral-500" />
<p className="text-center text-sm font-medium leading-5 tracking-[-0.02em] text-neutral-500">
- Select your stack, add at least one hostname to generate install
- instructions
+ Save your changes after selecting your stack, and adding your
+ hostnames to generate install instructions
</p>
</div>
);
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/stack-picker.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/stack-picker.tsx
index de41f373a3..ee4d096e46 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/stack-picker.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/stack-picker.tsx
@@ -53,7 +53,7 @@ function StackItemTitle({ title }: { title: string }) {
export function StackSelectionStatus({ count }: { count: number }) {
return (
<p className="text-content-subtle flex items-center gap-1.5 text-xs font-medium">
- <Layers3 className="size-3.5 shrink-0" />
+ <Layers3 variant="fill" className="size-3.5 shrink-0" />
{count} item{count === 1 ? "" : "s"} selected
</p>
);
@@ -93,14 +93,18 @@ export function StackPicker({
aria-pressed={selected}
onClick={() => toggleItem(item.id)}
className={cn(
- "relative flex h-[42px] items-center gap-2.5 rounded-lg border p-2 text-left transition-[border-color,background-color,transform] duration-150 ease-out",
+ "relative flex h-10 items-center gap-2.5 rounded-lg border bg-white px-3 py-2 text-left",
+ "transition-[border-color,background-color,box-shadow,transform] duration-150 ease-out",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/50",
- "active:scale-[0.98]",
+ "active:scale-[0.98] motion-reduce:transition-none motion-reduce:active:scale-100",
selected
- ? "border-neutral-600 bg-neutral-50"
- : "border-neutral-200 bg-white",
+ ? "border-[1.5px] border-neutral-600"
+ : "border-neutral-200",
!disabled &&
- "[@media(hover:hover)_and_(pointer:fine)]:hover:border-neutral-600",
+ "[@media(hover:hover)_and_(pointer:fine)]:hover:bg-neutral-50 [@media(hover:hover)_and_(pointer:fine)]:hover:shadow-[0_0_0_3px_#0000000A]",
+ !disabled &&
+ !selected &&
+ "[@media(hover:hover)_and_(pointer:fine)]:hover:border-neutral-300",
disabled && "cursor-not-allowed opacity-50",
)}
>
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsx
index 702ce3aa49..4652931a9c 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsx
@@ -220,7 +220,7 @@ export function VerifyInstall({ hostnames }: { hostnames: string[] }) {
<Button
text={canReverify ? "Verify again" : "Verify installation"}
- className="bg-bg-inverted h-7 w-fit px-2.5 text-sm font-medium tracking-[-0.02em] active:scale-[0.97]"
+ className="h-8 w-fit px-3"
loading={isPending}
disabled={!workspaceId || Boolean(disabledTooltip)}
disabledTooltip={disabledTooltip}
diff --git a/apps/web/lib/analytics/verify-installation.ts b/apps/web/lib/analytics/verify-installation.ts
index 2805cc6248..80b9dd161f 100644
--- a/apps/web/lib/analytics/verify-installation.ts
+++ b/apps/web/lib/analytics/verify-installation.ts
@@ -30,7 +30,8 @@ const DUB_SRC_RE =
/src\s*=\s*(?:["'][^"']*dubcdn\.com\/analytics[^"']*["']|[^\s>]*dubcdn\.com\/analytics[^\s>]*)/i;
const CONVERSION_SRC_RE =
/src\s*=\s*(?:["'][^"']*dubcdn\.com\/analytics[^"']*conversion-tracking[^"']*["']|[^\s>]*dubcdn\.com\/analytics[^\s>]*conversion-tracking[^\s>]*)/i;
-const SDK_NAME_RE = /data-sdkn=["']@dub\/analytics["']/i;
+const SDK_NAME_RE =
+ /data-sdkn\s*=\s*(?:["']@dub\/analytics["']|@dub\/analytics(?=[\s>/]))/i;
const PUBLISHABLE_KEY_RE = /data-publishable-key=/i;
export function analyzeDubAnalyticsScript(
diff --git a/apps/web/lib/tracking/build-tracking-setup.ts b/apps/web/lib/tracking/build-tracking-setup.ts
index 7f352024f3..0756907579 100644
--- a/apps/web/lib/tracking/build-tracking-setup.ts
+++ b/apps/web/lib/tracking/build-tracking-setup.ts
@@ -1,28 +1,4 @@
-import {
- guides,
- IntegrationType,
- StackItem,
- stackItems,
-} from "@/ui/guides/integrations";
-
-const STEP_TYPES: IntegrationType[] = [
- "client-sdk",
- "track-lead",
- "track-sale",
-];
-
-const TYPE_LABELS: Record<IntegrationType, string> = {
- "client-sdk": "Client-side",
- "track-lead": "Lead tracking",
- "track-sale": "Sale tracking",
-};
-
-const FALLBACK_CLIENT_STEP = {
- type: "client-sdk" as const,
- title: "Client-side script",
- url: "https://dub.co/docs/sdks/client-side",
- guideKey: null,
-};
+import { StackItem, stackItems } from "@/ui/guides/integrations";
const ANALYTICS_SCRIPT_BASE = "https://www.dubcdn.com/analytics/script.js";
@@ -35,10 +11,48 @@ const KEY_PRESENT_FOOTER =
const KEY_MISSING_FOOTER =
"Generate a publishable key in Tracking settings before tracking conversion events. Do not invent a key.";
-export type TrackingSetupStep = {
- type: IntegrationType;
- typeLabel: string;
+const ATTRIBUTION_URL = "https://dub.co/docs/concepts/attribution";
+const SERVER_TRACKING_URL = "https://dub.co/docs/quickstart/server";
+const CLIENT_TRACKING_URL = "https://dub.co/docs/quickstart/client";
+
+type IntegrationSlot = {
+ id: string;
title: string;
+ url: string;
+ stackIds: string[];
+};
+
+const INTEGRATION_SLOTS: IntegrationSlot[] = [
+ {
+ id: "stripe",
+ title: "Stripe",
+ url: "https://dub.co/docs/integrations/stripe",
+ stackIds: ["stripe-checkout", "stripe-payment-links", "stripe-customers"],
+ },
+ {
+ id: "shopify",
+ title: "Shopify",
+ url: "https://dub.co/docs/integrations/shopify",
+ stackIds: ["shopify"],
+ },
+ {
+ id: "gtm",
+ title: "Google Tag Manager",
+ url: "https://dub.co/docs/integrations/google-tag-manager",
+ stackIds: ["gtm"],
+ },
+ {
+ id: "segment",
+ title: "Segment",
+ url: "https://dub.co/docs/integrations/segment",
+ stackIds: ["segment"],
+ },
+];
+
+type TrackingSetupStepType = "attribution" | "tracking" | "integration";
+
+export type TrackingSetupStep = {
+ type: TrackingSetupStepType;
label: string;
url: string;
guideKey: string | null;
@@ -59,83 +73,80 @@ export type TrackingSetup = {
prompt: string;
};
-function getGuideForType(item: StackItem, type: IntegrationType) {
- return item.guideKeys
- .map((key) => guides.find((guide) => guide.key === key))
- .find((guide) => guide?.type === type);
-}
-
-function toStep(
- item: StackItem,
- type: IntegrationType,
- guide: NonNullable<ReturnType<typeof getGuideForType>>,
-): TrackingSetupStep {
- const typeLabel = TYPE_LABELS[type];
-
- return {
- type,
- typeLabel,
- title: item.title,
- label: `${typeLabel} — ${item.title}`,
- url: guide.url,
- guideKey: guide.key,
- icon: item.icon,
- iconProps: item.iconProps,
- };
+function toDocUrl(step: TrackingSetupStep) {
+ return step.url.replace(/^https:\/\//, "");
}
-function resolveTrackingSetupSteps(stack: string[]): TrackingSetupStep[] {
- const selected = stack
- .map((id) => stackItems.find((item) => item.id === id))
- .filter((item): item is StackItem => Boolean(item));
+function resolveIntegrationSteps(stack: string[]): TrackingSetupStep[] {
+ const seen = new Set<string>();
const steps: TrackingSetupStep[] = [];
- for (const type of STEP_TYPES) {
- const explicit = selected.filter((item) => item.type === type);
-
- if (explicit.length > 0) {
- for (const item of explicit) {
- const guide = getGuideForType(item, type);
- if (guide) {
- steps.push(toStep(item, type, guide));
- }
- }
+ for (const id of stack) {
+ const slot = INTEGRATION_SLOTS.find((item) => item.stackIds.includes(id));
+ if (!slot || seen.has(slot.id)) {
continue;
}
- for (const item of selected) {
- const guide = getGuideForType(item, type);
- if (guide) {
- steps.push(toStep(item, type, guide));
- }
- }
- }
+ seen.add(slot.id);
+ const item = stackItems.find((stackItem) => stackItem.id === id);
- if (!steps.some((step) => step.type === "client-sdk")) {
- const typeLabel = TYPE_LABELS["client-sdk"];
- steps.unshift({
- ...FALLBACK_CLIENT_STEP,
- typeLabel,
- label: FALLBACK_CLIENT_STEP.title,
- icon: null,
+ steps.push({
+ type: "integration",
+ label: slot.title,
+ url: slot.url,
+ guideKey: slot.id,
+ icon: item?.icon ?? null,
+ iconProps: item?.iconProps,
});
}
return steps;
}
+function resolveTrackingSetupSteps({
+ stack,
+ publishableKey,
+}: Pick<
+ BuildTrackingSetupInput,
+ "stack" | "publishableKey"
+>): TrackingSetupStep[] {
+ const trackingUrl = publishableKey
+ ? CLIENT_TRACKING_URL
+ : SERVER_TRACKING_URL;
+ const trackingLabel = publishableKey
+ ? "Client-side tracking"
+ : "Server-side tracking";
+
+ return [
+ {
+ type: "attribution",
+ label: "Attribution",
+ url: ATTRIBUTION_URL,
+ guideKey: null,
+ icon: null,
+ },
+ {
+ type: "tracking",
+ label: trackingLabel,
+ url: trackingUrl,
+ guideKey: null,
+ icon: null,
+ },
+ ...resolveIntegrationSteps(stack),
+ ];
+}
+
function composeTrackingSetupPrompt({
steps,
+ stack,
hostnames,
publishableKey,
siteVisitEnabled,
outboundEnabled,
}: {
steps: TrackingSetupStep[];
-} & Omit<BuildTrackingSetupInput, "stack">) {
- const clientSteps = steps.filter((step) => step.type === "client-sdk");
- const reactOnlyClient =
- clientSteps.length === 1 && clientSteps[0]?.guideKey === "react";
+} & BuildTrackingSetupInput) {
+ const reactSelected = stack.includes("react");
const scriptSegments = [
siteVisitEnabled ? "site-visit" : null,
outboundEnabled ? "outbound-domains" : null,
@@ -145,40 +156,28 @@ function composeTrackingSetupPrompt({
scriptSegments.length === 0
? ANALYTICS_SCRIPT_BASE
: `https://www.dubcdn.com/analytics/script.${scriptSegments.join(".")}.js`;
+ const stackTitles = stack
+ .map((id) => stackItems.find((item) => item.id === id)?.title)
+ .filter((title): title is string => Boolean(title));
const workspaceLines = [
hostnames.length > 0 ? `- Hostnames: ${hostnames.join(", ")}` : null,
publishableKey
? `- Publishable key (client-side): ${publishableKey}`
: null,
- reactOnlyClient ? null : `- Analytics script: ${analyticsScriptUrl}`,
+ stackTitles.length > 0 ? `- Stack: ${stackTitles.join(", ")}` : null,
+ reactSelected ? null : `- Analytics script: ${analyticsScriptUrl}`,
].filter(Boolean);
- const hasDuplicateTypes = STEP_TYPES.some(
- (type) => steps.filter((step) => step.type === type).length > 1,
- );
-
- const stepLines = steps.map((step, index) => {
- const heading =
- step.guideKey === null ? step.title : `${step.typeLabel} — ${step.title}`;
-
- return `${index + 1}. ${heading}\n Read ${step.url} and implement it.`;
- });
-
return [
- "Install Dub conversion tracking for this workspace.",
+ "Help me set up conversion tracking with Dub.co by referencing the following articles (and the linked articles within them):",
+ "",
+ ...steps.map((step) => `- ${toDocUrl(step)}`),
"",
"Workspace:",
...workspaceLines,
- ...(reactOnlyClient ? ["", REACT_PACKAGE_LINE] : []),
+ ...(reactSelected ? ["", REACT_PACKAGE_LINE] : []),
"",
- "Implement these steps in order:",
- ...stepLines,
- ...(hasDuplicateTypes
- ? [
- "",
- "If multiple guides share a step, use the one that matches this codebase.",
- ]
- : []),
+ "Make sure to tailor the implementation to my existing tech stack, and leverage server-side tracking if possible for the most accurate results.",
"",
publishableKey ? KEY_PRESENT_FOOTER : KEY_MISSING_FOOTER,
].join("\n");
@@ -187,16 +186,16 @@ function composeTrackingSetupPrompt({
export function buildTrackingSetup(
input: BuildTrackingSetupInput,
): TrackingSetup {
- const steps = resolveTrackingSetupSteps(input.stack);
+ const steps = resolveTrackingSetupSteps({
+ stack: input.stack,
+ publishableKey: input.publishableKey,
+ });
return {
steps,
prompt: composeTrackingSetupPrompt({
steps,
- hostnames: input.hostnames,
- publishableKey: input.publishableKey,
- siteVisitEnabled: input.siteVisitEnabled,
- outboundEnabled: input.outboundEnabled,
+ ...input,
}),
};
}
diff --git a/apps/web/ui/guides/integrations.ts b/apps/web/ui/guides/integrations.ts
index 3307dc6cdd..890f4ee82c 100644
--- a/apps/web/ui/guides/integrations.ts
+++ b/apps/web/ui/guides/integrations.ts
@@ -29,6 +29,7 @@ export type IntegrationGuide = {
recommended?: boolean;
content?: string;
url: string;
+ stepLabel?: string;
};
export const sections: {
@@ -187,7 +188,7 @@ export const stackItems: StackItem[] = [
id: "custom",
title: "Custom integration",
icon: CodeEditor,
- guideKeys: ["manual-client-sdk", "manual-track-lead", "manual-track-sale"],
+ guideKeys: ["manual-client-sdk", "manual-track-lead"],
type: "client-sdk",
},
];
@@ -252,7 +253,8 @@ export const guides: IntegrationGuide[] = [
title: "Custom Integration",
description: "Manual Lead Tracking",
icon: CodeEditor,
- url: "https://dub.co/docs/conversions/leads/introduction",
+ url: "https://dub.co/docs/quickstart/server",
+ stepLabel: "Server-side",
},
{
type: "track-lead",
@@ -369,6 +371,7 @@ export const guides: IntegrationGuide[] = [
title: "Custom Integration",
description: "Manual Sale Tracking",
icon: CodeEditor,
- url: "https://dub.co/docs/conversions/sales/introduction",
+ url: "https://dub.co/docs/quickstart/server",
+ stepLabel: "Server-side",
},
];
diff --git a/packages/ui/src/icons/nucleo/layers-3.tsx b/packages/ui/src/icons/nucleo/layers-3.tsx
index 7a05d9a1d8..847c755c83 100644
--- a/packages/ui/src/icons/nucleo/layers-3.tsx
+++ b/packages/ui/src/icons/nucleo/layers-3.tsx
@@ -1,6 +1,9 @@
import { SVGProps } from "react";
-export function Layers3(props: SVGProps<SVGSVGElement>) {
+export function Layers3({
+ variant = "outline",
+ ...props
+}: SVGProps<SVGSVGElement> & { variant?: "outline" | "fill" }) {
return (
<svg
height="18"
@@ -9,20 +12,34 @@ export function Layers3(props: SVGProps<SVGSVGElement>) {
xmlns="http://www.w3.org/2000/svg"
{...props}
>
- <g fill="currentColor">
- <path
- d="M15.685,4.423L9.816,1.333c-.511-.271-1.121-.27-1.631,0L2.315,4.423c-.494,.26-.801,.769-.801,1.327s.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327s-.307-1.067-.801-1.327Z"
- fill="currentColor"
- />
- <path
- d="M15.736,8.25c-.414,0-.75,.336-.75,.75l-5.87,3.091c-.072,.038-.158,.038-.232,0l-5.87-3.091c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75c0,.559,.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327,0-.414-.336-.75-.75-.75Z"
- fill="currentColor"
- />
- <path
- d="M15.736,11.5c-.414,0-.75,.336-.75,.75l-5.87,3.091c-.072,.038-.158,.038-.232,0l-5.87-3.091c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75c0,.559,.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327,0-.414-.336-.75-.75-.75Z"
- fill="currentColor"
- />
- </g>
+ {variant === "fill" ? (
+ <g fill="currentColor">
+ <path
+ d="M15.685,4.423L9.816,1.333c-.511-.271-1.121-.27-1.631,0L2.315,4.423c-.494,.26-.801,.769-.801,1.327s.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327s-.307-1.067-.801-1.327Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.736,8.25c-.414,0-.75,.336-.75,.75l-5.87,3.091c-.072,.038-.158,.038-.232,0l-5.87-3.091c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75c0,.559,.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327,0-.414-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ <path
+ d="M15.736,11.5c-.414,0-.75,.336-.75,.75l-5.87,3.091c-.072,.038-.158,.038-.232,0l-5.87-3.091c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75c0,.559,.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327,0-.414-.336-.75-.75-.75Z"
+ fill="currentColor"
+ />
+ </g>
+ ) : (
+ <g
+ fill="none"
+ stroke="currentColor"
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ strokeWidth="1.5"
+ >
+ <path d="M15.685,4.423L9.816,1.333c-.511-.271-1.121-.27-1.631,0L2.315,4.423c-.494,.26-.801,.769-.801,1.327s.307,1.067,.801,1.327l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091c.494-.26,.801-.769,.801-1.327s-.307-1.067-.801-1.327Z" />
+ <path d="M2.25,9.75l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091" />
+ <path d="M2.25,13l5.869,3.09c.255,.135,.536,.203,.816,.203s.56-.067,.815-.202l5.87-3.091" />
+ </g>
+ )}
</svg>
);
}