The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add back button
Kiran Kd3d3b926db3f
diff --git a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/[[...guide]]/page.tsx b/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/[[...guide]]/page.tsxindex 122baa7910..a509ce30ef 100644--- a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/[[...guide]]/page.tsx+++ b/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/[[...guide]]/page.tsx@@ -6,13 +6,12 @@ import { notFound } from "next/navigation";import { StepPage } from "../../step-page";export default async function ConnectGuidesPage({- params,+ params: { guide },}: {params: {guide?: string[];};}) {- const { guide } = params;let selectedGuide: IntegrationGuide | null = null;let markdownContent: string | null = null;@@ -36,8 +35,10 @@ export default async function ConnectGuidesPage({<div><p className="mb-6 text-sm text-neutral-600">Ensure Dub is connected to your app, so you can track your clicks,- leads, and sales on your program. A developer might be required to- complete.+ leads, and sales on your program.{" "}+ <span className="font-medium">+ A developer might be required to complete.+ </span></p>{selectedGuide && markdownContent ? (diff --git a/apps/web/ui/guides/guide.tsx b/apps/web/ui/guides/guide.tsxindex f69b8380cd..fa2e61642b 100644--- a/apps/web/ui/guides/guide.tsx+++ b/apps/web/ui/guides/guide.tsx@@ -25,47 +25,45 @@ const integrationTypeToTitle: Record<IntegrationType, string> = {export function Guide({ markdown }: { markdown: string }) {const pathname = usePathname();const { guide } = useParams() as { guide: string[] };- const guideKey = guide[0];-- const selectedGuide = guides.find((g) => g.key === guideKey)!;-const [copiedGuideUrl, copyGuideUrl] = useCopyToClipboard();+ const guideKey = guide[0];+ const selectedGuide = guides.find((g) => g.key === guideKey)!;const Icon = selectedGuide.icon;return (<><hr className="mb-6 border-neutral-200" />- <div className="mx-auto max-w-2xl space-y-6">+ <div className="mx-auto max-w-2xl space-y-5"><div className="flex items-center justify-between">- <Icon className="size-8" />-- <div className="flex items-center gap-2">- <Link href={pathname.replace(`/${guideKey}`, "")}>- <Button- text="Select another method"- variant="secondary"- className="h-8 w-fit px-3"- icon={<ChevronLeft className="size-3.5" />}- />- </Link>+ <Link href={pathname.replace(`/${guideKey}`, "")}><Button- text="Copy guide link"variant="secondary"- className="h-8 w-fit px-3"- icon={- copiedGuideUrl ? (- <Check className="size-3.5" />- ) : (- <Copy className="size-3.5" />- )- }- onClick={() => {- copyGuideUrl(pathname);- toast.success("Copied to clipboard");- }}+ className="h-8 w-fit rounded-lg border-none bg-neutral-100 px-2"+ icon={<ChevronLeft className="size-3.5 text-neutral-900" />}/>- </div>+ </Link>++ <Button+ text="Copy guide link"+ variant="secondary"+ className="h-8 w-fit rounded-lg px-3"+ icon={+ copiedGuideUrl ? (+ <Check className="size-3.5" />+ ) : (+ <Copy className="size-3.5" />+ )+ }+ onClick={() => {+ copyGuideUrl(pathname);+ toast.success("Copied to clipboard");+ }}+ />+ </div>++ <div>+ <Icon className="size-8" /></div><div className="flex flex-col">@@ -81,7 +79,7 @@ export function Guide({ markdown }: { markdown: string }) {<Markdown>{markdown}</Markdown><Link- href={pathname}+ href={pathname.replace(`/${guideKey}`, "")}className={cn(buttonVariants({variant: "primary",