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 application form

Steven Tey5f7b3c3285d2
diff --git a/apps/web/app/partners.dub.co/(apply)/[programSlug]/apply/page.tsx b/apps/web/app/partners.dub.co/(apply)/[programSlug]/apply/page.tsx
index 76daf1ae82..ee9a5ff1ec 100644
--- a/apps/web/app/partners.dub.co/(apply)/[programSlug]/apply/page.tsx
+++ b/apps/web/app/partners.dub.co/(apply)/[programSlug]/apply/page.tsx
@@ -29,14 +29,7 @@ export default async function ApplicationPage({
} as CSSProperties
}
>
- <Header
- program={{
- logo: program.logo,
- wordmark: program.wordmark,
- }}
- slug={programSlug}
- showApply={false}
- />
+ <Header program={program} showApply={false} />
<div className="p-6">
{/* Hero section */}
<div className="grid grid-cols-1 gap-5 sm:pt-20">
diff --git a/apps/web/app/partners.dub.co/(apply)/[programSlug]/header.tsx b/apps/web/app/partners.dub.co/(apply)/[programSlug]/header.tsx
index dc12e644f8..663d25f00c 100644
--- a/apps/web/app/partners.dub.co/(apply)/[programSlug]/header.tsx
+++ b/apps/web/app/partners.dub.co/(apply)/[programSlug]/header.tsx
@@ -5,20 +5,17 @@ import { Button, useScroll, Wordmark } from "@dub/ui";
import { cn } from "@dub/utils";
import { useSession } from "next-auth/react";
import Link from "next/link";
-import { usePathname, useRouter } from "next/navigation";
+import { usePathname } from "next/navigation";
export function Header({
program,
- slug,
showLogin = true,
showApply = true,
}: {
- program: Pick<Program, "wordmark" | "logo">;
- slug: string;
+ program: Pick<Program, "slug" | "wordmark" | "logo">;
showLogin?: boolean;
showApply?: boolean;
}) {
- const router = useRouter();
const pathname = usePathname();
const { data: session, status } = useSession();
@@ -38,7 +35,7 @@ export function Header({
)}
/>
- <Link href={`/${slug}`} className="animate-fade-in my-0.5 block">
+ <Link href={`/${program.slug}`} className="animate-fade-in my-0.5 block">
{program.wordmark || program.logo ? (
<img
className="h-7 max-w-32"
@@ -61,7 +58,7 @@ export function Header({
</Link>
)}
{showApply && (
- <Link href={`/${slug}/apply`}>
+ <Link href={`/${program.slug}/apply`}>
<Button
type="button"
text="Apply"
diff --git a/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx b/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx
index 31e7ecaf19..3a3d565294 100644
--- a/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx
+++ b/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx
@@ -17,7 +17,7 @@ export async function generateMetadata({
}) {
const program = await getProgram({ slug: programSlug });
- if (!program || !program.landerData || !program.defaultRewardId) {
+ if (!program || !program.defaultRewardId) {
notFound();
}
@@ -55,7 +55,7 @@ export default async function ApplyLayout({
}: PropsWithChildren<{ params: { programSlug: string } }>) {
const program = await getProgram({ slug: programSlug });
- if (!program || !program.landerData) {
+ if (!program) {
notFound();
}
diff --git a/apps/web/ui/layout/sidebar/affiliate-program-popup.tsx b/apps/web/ui/layout/sidebar/affiliate-program-popup.tsx
index 284e04d8b1..42ac605a3e 100644
--- a/apps/web/ui/layout/sidebar/affiliate-program-popup.tsx
+++ b/apps/web/ui/layout/sidebar/affiliate-program-popup.tsx
@@ -69,7 +69,7 @@ export function AffiliateProgramPopup({
New Dub Referrals
</h2>
<p className="mt-1.5 text-xs text-neutral-500">
- You can share your love for Dub and{" "}
+ Share your love for Dub and{" "}
<strong className="font-medium">
earn 30% for each referral for up to 12 months
</strong>