Skip to content

Commit 5f7b3c3

Browse files
committed
fix application form
1 parent 9ffc263 commit 5f7b3c3

File tree

4 files changed

+8
-18
lines changed

4 files changed

+8
-18
lines changed

apps/web/app/partners.dub.co/(apply)/[programSlug]/apply/page.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,7 @@ export default async function ApplicationPage({
2929
} as CSSProperties
3030
}
3131
>
32-
<Header
33-
program={{
34-
logo: program.logo,
35-
wordmark: program.wordmark,
36-
}}
37-
slug={programSlug}
38-
showApply={false}
39-
/>
32+
<Header program={program} showApply={false} />
4033
<div className="p-6">
4134
{/* Hero section */}
4235
<div className="grid grid-cols-1 gap-5 sm:pt-20">

apps/web/app/partners.dub.co/(apply)/[programSlug]/header.tsx

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,17 @@ import { Button, useScroll, Wordmark } from "@dub/ui";
55
import { cn } from "@dub/utils";
66
import { useSession } from "next-auth/react";
77
import Link from "next/link";
8-
import { usePathname, useRouter } from "next/navigation";
8+
import { usePathname } from "next/navigation";
99

1010
export function Header({
1111
program,
12-
slug,
1312
showLogin = true,
1413
showApply = true,
1514
}: {
16-
program: Pick<Program, "wordmark" | "logo">;
17-
slug: string;
15+
program: Pick<Program, "slug" | "wordmark" | "logo">;
1816
showLogin?: boolean;
1917
showApply?: boolean;
2018
}) {
21-
const router = useRouter();
2219
const pathname = usePathname();
2320
const { data: session, status } = useSession();
2421

@@ -38,7 +35,7 @@ export function Header({
3835
)}
3936
/>
4037

41-
<Link href={`/${slug}`} className="animate-fade-in my-0.5 block">
38+
<Link href={`/${program.slug}`} className="animate-fade-in my-0.5 block">
4239
{program.wordmark || program.logo ? (
4340
<img
4441
className="h-7 max-w-32"
@@ -61,7 +58,7 @@ export function Header({
6158
</Link>
6259
)}
6360
{showApply && (
64-
<Link href={`/${slug}/apply`}>
61+
<Link href={`/${program.slug}/apply`}>
6562
<Button
6663
type="button"
6764
text="Apply"

apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function generateMetadata({
1717
}) {
1818
const program = await getProgram({ slug: programSlug });
1919

20-
if (!program || !program.landerData || !program.defaultRewardId) {
20+
if (!program || !program.defaultRewardId) {
2121
notFound();
2222
}
2323

@@ -55,7 +55,7 @@ export default async function ApplyLayout({
5555
}: PropsWithChildren<{ params: { programSlug: string } }>) {
5656
const program = await getProgram({ slug: programSlug });
5757

58-
if (!program || !program.landerData) {
58+
if (!program) {
5959
notFound();
6060
}
6161

apps/web/ui/layout/sidebar/affiliate-program-popup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function AffiliateProgramPopup({
6969
New Dub Referrals
7070
</h2>
7171
<p className="mt-1.5 text-xs text-neutral-500">
72-
You can share your love for Dub and{" "}
72+
Share your love for Dub and{" "}
7373
<strong className="font-medium">
7474
earn 30% for each referral for up to 12 months
7575
</strong>

0 commit comments

Comments
 (0)