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.

some cleanup

Kiran K470ef50ae9c8
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page-client.tsx
index 8782824043..645c303ce8 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page-client.tsx
@@ -39,5 +39,9 @@ export default function ReferralsPageClient() {
return <div>Loading...</div>;
}
- return <ReferralsEmbed publicToken={publicToken} />;
+ return (
+ <>
+ <ReferralsEmbed publicToken={publicToken} />
+ </>
+ );
}
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx
index 7eb9276d35..42f13f9059 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/settings/referrals/page.tsx
@@ -1,9 +1,14 @@
+import LayoutLoader from "@/ui/layout/layout-loader";
+import { Suspense } from "react";
import ReferralsPageClient from "./page-client";
export default async function ReferralsPage() {
return (
- <>
+ <Suspense fallback={<LayoutLoader />}>
+ <h1 className="text-2xl font-semibold tracking-tight text-black">
+ Referrals
+ </h1>
<ReferralsPageClient />
- </>
+ </Suspense>
);
}
diff --git a/apps/web/app/app.dub.co/embed/page-client.tsx b/apps/web/app/app.dub.co/embed/page-client.tsx
index 64f6cd43e4..4892468856 100644
--- a/apps/web/app/app.dub.co/embed/page-client.tsx
+++ b/apps/web/app/app.dub.co/embed/page-client.tsx
@@ -2,13 +2,7 @@
import { IntervalOptions } from "@/lib/analytics/types";
import { ProgramCommissionDescription } from "@/ui/partners/program-commission-description";
-import {
- Button,
- Check2,
- MaxWidthWrapper,
- useCopyToClipboard,
- useRouterStuff,
-} from "@dub/ui";
+import { Button, Check2, useCopyToClipboard, useRouterStuff } from "@dub/ui";
import { Copy, MoneyBill2 } from "@dub/ui/src/icons";
import { getPrettyUrl } from "@dub/utils";
import { ProgramOverviewContext } from "./context";
@@ -22,7 +16,7 @@ import { useReferralProgram } from "./use-referral-program";
export function ReferralsEmbedPageClient() {
const { program } = useReferralProgram();
const [copied, copyToClipboard] = useCopyToClipboard();
- const { getQueryString, searchParamsObj } = useRouterStuff();
+ const { searchParamsObj } = useRouterStuff();
const { link, isLoading: isLoadingLink } = useReferralLink();
const {
@@ -38,7 +32,7 @@ export function ReferralsEmbedPageClient() {
const color = "#8B5CF6"; // TODO: Read this from a program attribute
return (
- <MaxWidthWrapper className="pb-10">
+ <>
<div className="relative flex flex-col rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">
{program && <HeroBackground logo={program?.logo} color={color} />}
<span className="flex items-center gap-2 text-sm text-neutral-500">
@@ -109,6 +103,6 @@ export function ReferralsEmbedPageClient() {
</div>
</div>
</ProgramOverviewContext.Provider>
- </MaxWidthWrapper>
+ </>
);
}