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 build

Kiran K22ce82ecb0d2
diff --git a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/page-client.tsx b/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/page-client.tsx
deleted file mode 100644
index 25d276302b..0000000000
--- a/apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/connect/page-client.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-"use client";
-
-import { ProgramData } from "@/lib/types";
-import { Guide } from "@/ui/guides/guide";
-import { GuideList } from "@/ui/guides/guide-list";
-import { guides, IntegrationGuide } from "@/ui/guides/integrations";
-import { getDomainWithoutWWW } from "@dub/utils";
-import { useSearchParams } from "next/navigation";
-import { useEffect, useState } from "react";
-import { useFormContext } from "react-hook-form";
-
-interface PageClientProps {
- markdown: string | null;
-}
-
-export function PageClient({ markdown }: PageClientProps) {
- const searchParams = useSearchParams();
- const { watch } = useFormContext<ProgramData>();
-
- const [selectedGuide, setSelectedGuide] = useState<IntegrationGuide | null>(
- null,
- );
-
- const [url] = watch(["url"]);
-
- useEffect(() => {
- const guide = searchParams.get("guide");
-
- if (!guide) {
- setSelectedGuide(null);
- return;
- }
-
- const integrationGuide = guides.find((g) => g.key === guide.toLowerCase());
-
- if (integrationGuide) {
- setSelectedGuide(integrationGuide);
- }
- }, [searchParams]);
-
- return (
- <div>
- <p className="mb-6 text-sm text-neutral-600">
- Ensure Dub is connected to your app{" "}
- <strong>{url ? getDomainWithoutWWW(url) : ""}</strong>, so you can track
- your clicks, leads, and sales on your program. A developer might be
- required to complete.
- </p>
-
- <div>
- {selectedGuide ? (
- <Guide selectedGuide={selectedGuide} markdown={markdown} />
- ) : (
- <GuideList />
- )}
- </div>
- </div>
- );
-}
diff --git a/apps/web/app/(ee)/app.dub.co/[slug]/(guide)/tracking-guide/page-client.tsx b/apps/web/app/(ee)/app.dub.co/[slug]/(guide)/tracking-guide/page-client.tsx
deleted file mode 100644
index e651cb679d..0000000000
--- a/apps/web/app/(ee)/app.dub.co/[slug]/(guide)/tracking-guide/page-client.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-"use client";
-
-import { Guide } from "@/ui/guides/guide";
-import { GuideList } from "@/ui/guides/guide-list";
-import { guides, IntegrationGuide } from "@/ui/guides/integrations";
-import { useSearchParams } from "next/navigation";
-import { useEffect, useState } from "react";
-
-interface PageClientProps {
- markdown: string | null;
-}
-
-export function PageClient({ markdown }: PageClientProps) {
- const searchParams = useSearchParams();
-
- const [selectedGuide, setSelectedGuide] = useState<IntegrationGuide | null>(
- null,
- );
-
- useEffect(() => {
- const guide = searchParams.get("guide");
-
- if (!guide) {
- setSelectedGuide(null);
- return;
- }
-
- const integrationGuide = guides.find((g) => g.key === guide.toLowerCase());
-
- if (integrationGuide) {
- setSelectedGuide(integrationGuide);
- }
- }, [searchParams]);
-
- return (
- <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.
- </p>
-
- <div>
- {selectedGuide ? (
- <Guide selectedGuide={selectedGuide} markdown={markdown} />
- ) : (
- <GuideList showConnectLaterButton={false} />
- )}
- </div>
- </div>
- );
-}