Skip to content

Commit c69a77d

Browse files
committed
remove unused script
1 parent 0f8c4c2 commit c69a77d

3 files changed

Lines changed: 129 additions & 207 deletions

File tree

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

Lines changed: 89 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { notFound, redirect } from "next/navigation";
99
import { CSSProperties } from "react";
1010
import { ApplyHeader } from "../../header";
1111
import { CTAButtons } from "./cta-buttons";
12-
import { PixelConversion } from "./pixel-conversion";
1312
import { Screenshot } from "./screenshot";
1413

1514
export const dynamic = "force-dynamic";
@@ -85,111 +84,101 @@ export default async function SuccessPage(props: {
8584
const hasPartnerProfile = !!enrollmentId;
8685

8786
return (
88-
<>
89-
{program.slug === "perplexity" && <PixelConversion />}
90-
<div
91-
className="relative"
92-
style={
93-
{
94-
"--brand": program.group.brandColor || "#000000",
95-
"--brand-ring": "rgb(from var(--brand) r g b / 0.2)",
96-
} as CSSProperties
97-
}
98-
>
99-
<ApplyHeader
100-
group={program.group}
101-
showLogin={false}
102-
showApply={false}
103-
/>
104-
<div className="p-6">
105-
<div className="grid grid-cols-1 gap-5 sm:pt-20">
106-
<span className="w-fit rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-neutral-700">
107-
Step 2 of 2
108-
</span>
109-
<h1 className="text-4xl font-semibold">
110-
{hasPartnerProfile
111-
? "Application submitted"
112-
: "Finish your application"}
113-
</h1>
114-
<div className="flex flex-col gap-4 text-base text-neutral-700">
115-
{hasPartnerProfile && (
116-
<p>
117-
Your application has been submitted for review.
118-
{application && (
119-
<>
120-
{" "}
121-
You'll receive an update at{" "}
122-
<strong className="font-semibold">
123-
{application.email}
124-
</strong>
125-
.
126-
</>
127-
)}
128-
</p>
129-
)}
130-
{!hasPartnerProfile && (
131-
<p>
132-
Your application to{" "}
133-
<strong className="font-semibold">{program.name}</strong> has
134-
been saved, but you still need to create your{" "}
135-
<strong className="font-semibold">Dub Partners</strong>{" "}
136-
account to complete your application.
137-
<br />
138-
<br />
139-
Once you create your account, your application will be
140-
submitted to <b>{program.name}</b> and you'll hear back from
141-
them{" "}
142-
<strong className="font-semibold">
143-
{application?.email
144-
? `at ${application.email}`
145-
: "via email"}
146-
</strong>
147-
.
148-
</p>
149-
)}
150-
</div>
151-
</div>
152-
153-
{/* Buttons */}
154-
<div className="mt-12 flex flex-col gap-3">
155-
<CTAButtons />
87+
<div
88+
className="relative"
89+
style={
90+
{
91+
"--brand": program.group.brandColor || "#000000",
92+
"--brand-ring": "rgb(from var(--brand) r g b / 0.2)",
93+
} as CSSProperties
94+
}
95+
>
96+
<ApplyHeader group={program.group} showLogin={false} showApply={false} />
97+
<div className="p-6">
98+
<div className="grid grid-cols-1 gap-5 sm:pt-20">
99+
<span className="w-fit rounded-md bg-neutral-100 px-2 py-1 text-xs font-medium text-neutral-700">
100+
Step 2 of 2
101+
</span>
102+
<h1 className="text-4xl font-semibold">
103+
{hasPartnerProfile
104+
? "Application submitted"
105+
: "Finish your application"}
106+
</h1>
107+
<div className="flex flex-col gap-4 text-base text-neutral-700">
108+
{hasPartnerProfile && (
109+
<p>
110+
Your application has been submitted for review.
111+
{application && (
112+
<>
113+
{" "}
114+
You'll receive an update at{" "}
115+
<strong className="font-semibold">
116+
{application.email}
117+
</strong>
118+
.
119+
</>
120+
)}
121+
</p>
122+
)}
123+
{!hasPartnerProfile && (
124+
<p>
125+
Your application to{" "}
126+
<strong className="font-semibold">{program.name}</strong> has
127+
been saved, but you still need to create your{" "}
128+
<strong className="font-semibold">Dub Partners</strong> account
129+
to complete your application.
130+
<br />
131+
<br />
132+
Once you create your account, your application will be submitted
133+
to <b>{program.name}</b> and you'll hear back from them{" "}
134+
<strong className="font-semibold">
135+
{application?.email ? `at ${application.email}` : "via email"}
136+
</strong>
137+
.
138+
</p>
139+
)}
156140
</div>
141+
</div>
157142

158-
{/* Screenshot */}
159-
<div className="relative mt-16">
160-
<Screenshot
161-
program={{ name: program.name, logo: program.logo }}
162-
className="h-auto w-full [mask-image:linear-gradient(black_80%,transparent)]"
163-
/>
164-
<div className="absolute bottom-0 left-1/2 -translate-x-1/2">
165-
<div className="absolute -inset-[50%] rounded-full bg-white blur-lg" />
166-
167-
{programSlug !== "dub" && (
168-
<div className="relative flex items-center gap-2 rounded-full border border-neutral-100 bg-gradient-to-b from-white to-neutral-50 p-2 shadow-[0_8px_28px_0_#00000017]">
169-
<img
170-
className="size-10 shrink-0 rounded-full"
171-
src={program.logo || `${OG_AVATAR_URL}${program.name}`}
172-
alt={`${program.name} logo`}
173-
/>
174-
<BoltFill className="shrink-0 text-[var(--brand)] opacity-30" />
175-
<Logo className="size-10 shrink-0" />
176-
</div>
177-
)}
178-
</div>
179-
</div>
143+
{/* Buttons */}
144+
<div className="mt-12 flex flex-col gap-3">
145+
<CTAButtons />
146+
</div>
180147

181-
{/* Feature grid */}
182-
<div className="mt-16 grid grid-cols-1 gap-10 sm:grid-cols-2">
183-
{FEATURES.map(({ icon: Icon, title, description }) => (
184-
<div key={title} className="flex flex-col gap-2.5 text-sm">
185-
<Icon className="size-4 shrink-0 text-[var(--brand)]" />
186-
<h3 className="font-semibold text-neutral-900">{title}</h3>
187-
<p className="text-neutral-500">{description}</p>
148+
{/* Screenshot */}
149+
<div className="relative mt-16">
150+
<Screenshot
151+
program={{ name: program.name, logo: program.logo }}
152+
className="h-auto w-full [mask-image:linear-gradient(black_80%,transparent)]"
153+
/>
154+
<div className="absolute bottom-0 left-1/2 -translate-x-1/2">
155+
<div className="absolute -inset-[50%] rounded-full bg-white blur-lg" />
156+
157+
{programSlug !== "dub" && (
158+
<div className="relative flex items-center gap-2 rounded-full border border-neutral-100 bg-gradient-to-b from-white to-neutral-50 p-2 shadow-[0_8px_28px_0_#00000017]">
159+
<img
160+
className="size-10 shrink-0 rounded-full"
161+
src={program.logo || `${OG_AVATAR_URL}${program.name}`}
162+
alt={`${program.name} logo`}
163+
/>
164+
<BoltFill className="shrink-0 text-[var(--brand)] opacity-30" />
165+
<Logo className="size-10 shrink-0" />
188166
</div>
189-
))}
167+
)}
190168
</div>
191169
</div>
170+
171+
{/* Feature grid */}
172+
<div className="mt-16 grid grid-cols-1 gap-10 sm:grid-cols-2">
173+
{FEATURES.map(({ icon: Icon, title, description }) => (
174+
<div key={title} className="flex flex-col gap-2.5 text-sm">
175+
<Icon className="size-4 shrink-0 text-[var(--brand)]" />
176+
<h3 className="font-semibold text-neutral-900">{title}</h3>
177+
<p className="text-neutral-500">{description}</p>
178+
</div>
179+
))}
180+
</div>
192181
</div>
193-
</>
182+
</div>
194183
);
195184
}

apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/(default)/apply/success/pixel-conversion.tsx

Lines changed: 0 additions & 46 deletions
This file was deleted.

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

Lines changed: 40 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { APP_DOMAIN, PARTNERS_DOMAIN } from "@dub/utils";
77
import { constructMetadata } from "@dub/utils/src/functions";
88
import Link from "next/link";
99
import { notFound } from "next/navigation";
10-
import Script from "next/script";
1110
import { PropsWithChildren } from "react";
1211

1312
export async function generateMetadata(props: {
@@ -63,69 +62,49 @@ export default async function ApplyLayout(
6362
}
6463

6564
return (
66-
<>
67-
{program.slug === "perplexity" && (
68-
<>
69-
{/* Meta script */}
70-
<Script
71-
strategy="beforeInteractive"
72-
dangerouslySetInnerHTML={{
73-
__html: `!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '1340891577378510');fbq('track', 'PageView');`,
74-
}}
75-
/>
76-
{/* LinkedIn script */}
77-
<Script
78-
strategy="beforeInteractive"
79-
dangerouslySetInnerHTML={{
80-
__html: `_linkedin_partner_id = "8071818";window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];window._linkedin_data_partner_ids.push(_linkedin_partner_id);(function(l) {if (!l){window.lintrk = function(a,b){window.lintrk.q.push([a,b])};window.lintrk.q=[]}var s = document.getElementsByTagName("script")[0];var b = document.createElement("script");b.type = "text/javascript";b.async = true;b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";s.parentNode.insertBefore(b, s);})(window.lintrk);`,
81-
}}
82-
/>
83-
</>
84-
)}
85-
<div className="relative">
86-
<div className="relative z-10 mx-auto min-h-screen w-full max-w-screen-sm bg-white">
87-
<div className="pointer-events-none absolute left-0 top-0 h-screen w-full border-x border-neutral-200 [mask-image:linear-gradient(black,transparent)]" />
88-
{children}
89-
{/* Footer */}
90-
<footer className="mt-14 flex flex-col items-center gap-4 py-6 text-center text-xs text-neutral-500">
91-
<Link
92-
href="https://dub.co/partners"
65+
<div className="relative">
66+
<div className="relative z-10 mx-auto min-h-screen w-full max-w-screen-sm bg-white">
67+
<div className="pointer-events-none absolute left-0 top-0 h-screen w-full border-x border-neutral-200 [mask-image:linear-gradient(black,transparent)]" />
68+
{children}
69+
{/* Footer */}
70+
<footer className="mt-14 flex flex-col items-center gap-4 py-6 text-center text-xs text-neutral-500">
71+
<Link
72+
href="https://dub.co/partners"
73+
target="_blank"
74+
className="flex items-center gap-1.5 whitespace-nowrap"
75+
>
76+
Powered by <Wordmark className="h-4 p-0.5" />
77+
</Link>
78+
<span className="flex items-center gap-2">
79+
<a
80+
href="https://dub.co/legal/partners"
9381
target="_blank"
94-
className="flex items-center gap-1.5 whitespace-nowrap"
82+
className="transition-colors duration-75 hover:text-neutral-600"
9583
>
96-
Powered by <Wordmark className="h-4 p-0.5" />
97-
</Link>
98-
<span className="flex items-center gap-2">
99-
<a
100-
href="https://dub.co/legal/partners"
101-
target="_blank"
102-
className="transition-colors duration-75 hover:text-neutral-600"
103-
>
104-
Terms of Service
105-
</a>
106-
<span className="text-base text-neutral-200">&bull;</span>
107-
<a
108-
href="https://dub.co/legal/privacy"
109-
target="_blank"
110-
className="transition-colors duration-75 hover:text-neutral-600"
111-
>
112-
Privacy Policy
113-
</a>
114-
</span>
115-
</footer>
116-
</div>
84+
Terms of Service
85+
</a>
86+
<span className="text-base text-neutral-200">&bull;</span>
87+
<a
88+
href="https://dub.co/legal/privacy"
89+
target="_blank"
90+
className="transition-colors duration-75 hover:text-neutral-600"
91+
>
92+
Privacy Policy
93+
</a>
94+
</span>
95+
</footer>
96+
</div>
11797

118-
{/* Background grid */}
119-
<div className="absolute inset-0 flex h-fit w-full items-center justify-center">
120-
<img
121-
src="https://assets.dub.co/misc/program-apply-grid.svg"
122-
alt=""
123-
width={1280}
124-
height={480}
125-
className="[mask-image:radial-gradient(70%_100%_at_50%_0%,black_30%,transparent)]"
126-
/>
127-
</div>
98+
{/* Background grid */}
99+
<div className="absolute inset-0 flex h-fit w-full items-center justify-center">
100+
<img
101+
src="https://assets.dub.co/misc/program-apply-grid.svg"
102+
alt=""
103+
width={1280}
104+
height={480}
105+
className="[mask-image:radial-gradient(70%_100%_at_50%_0%,black_30%,transparent)]"
106+
/>
128107
</div>
129-
</>
108+
</div>
130109
);
131110
}

0 commit comments

Comments
 (0)