Connect, collaborate, and grow with a community of TypeScript developers
Revert "feat: Waitlist referrers (#466)"
bautistaaa4595e8f99dac
diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsxindex cb943833..ae323de6 100644--- a/apps/web/src/app/page.tsx+++ b/apps/web/src/app/page.tsx@@ -11,13 +11,13 @@ export const metadata: Metadata = {'Connect, collaborate, and grow with a community of TypeScript developers. Elevate your skills through interactive coding challenges, discussions, and knowledge sharing',};-export default async function Index({ searchParams }: { searchParams: Record<string, string> }) {+export default async function Index() {return (<><Hero /><Features /><Community />- <Waitlist ref={searchParams.ref} />+ <Waitlist /><Footsies /></>);diff --git a/apps/web/src/components/landing/waitlist/banner.tsx b/apps/web/src/components/landing/waitlist/banner.tsxindex db4a144a..e361098b 100644--- a/apps/web/src/components/landing/waitlist/banner.tsx+++ b/apps/web/src/components/landing/waitlist/banner.tsx@@ -5,15 +5,7 @@ import { Balancer } from 'react-wrap-balancer';import { Button } from '@repo/ui';import styles from '~/components/landing/waitlist/waitlist.module.css';-export interface WaitlistProps {- ref?: string;-}--function Waitlist({ ref }: WaitlistProps) {- let waitlistUrl = `/waitlist`;- const searchParams = new URLSearchParams(ref ? { ref } : undefined).toString();- if (searchParams.length) waitlistUrl += `?${searchParams}`;-+function Waitlist() {return (<section className={clsx(styles.backdrop, 'relative overflow-hidden')}><div className="container relative grid grid-cols-1 items-center justify-center py-[64px] md:grid-cols-2">@@ -34,7 +26,7 @@ function Waitlist({ ref }: WaitlistProps) {asChildclassName="group relative w-fit overflow-hidden rounded-xl bg-gradient-to-bl from-indigo-400 via-blue-400 to-emerald-400 p-[2px] font-bold transition-all duration-300 hover:rounded-3xl active:rounded-xl active:duration-150 sm:mx-16 md:mx-auto md:mr-0 lg:mr-auto lg:scale-[1.5] lg:hover:scale-[1.6] lg:active:scale-[1.5]">- <Link href={waitlistUrl}>+ <Link href="/waitlist"><span className="inline-flex h-full w-fit items-center gap-1 rounded-[10px] bg-white/90 px-4 py-2 text-black transition-all duration-300 group-hover:rounded-3xl group-hover:bg-white/0 group-hover:text-white dark:bg-black/80 dark:text-white group-hover:dark:bg-black/0 dark:group-hover:text-black"><Mail className="mr-1 h-4 w-4 stroke-[3]" />Join the Waitlistdiff --git a/apps/web/src/components/landing/waitlist/create.action.ts b/apps/web/src/components/landing/waitlist/create.action.tsindex dd7dc2bd..949d863c 100644--- a/apps/web/src/components/landing/waitlist/create.action.ts+++ b/apps/web/src/components/landing/waitlist/create.action.ts@@ -28,7 +28,6 @@ export const sendUserSignupEmail = async (to: string) => {export async function uploadWaitlistEntry(data: WaitlistFormSchema) {const isUser = data.intention === 'user';const isBuilder = data.intention === 'builder';- const ref = data.ref;const existingEntry = await prisma.waitlist.findFirst({where: {@@ -45,7 +44,6 @@ export async function uploadWaitlistEntry(data: WaitlistFormSchema) {name: data.name,email: data.email,intention: isUser ? 'USER' : isBuilder ? 'BUILDER' : 'BOTH',- referrer: ref,},});diff --git a/apps/web/src/components/landing/waitlist/index.tsx b/apps/web/src/components/landing/waitlist/index.tsxindex e9911192..b1ec634f 100644--- a/apps/web/src/components/landing/waitlist/index.tsx+++ b/apps/web/src/components/landing/waitlist/index.tsx@@ -2,11 +2,7 @@ import { Balancer } from 'react-wrap-balancer';import { WaitlistForm } from '~/components/landing/waitlist/waitlist-form';import styles from '~/components/landing/waitlist/waitlist.module.css';-export interface WaitlistPageProps {- searchParams: Record<string, string>;-}--export function Waitlist({ searchParams }: WaitlistPageProps) {+export function Waitlist() {return (<main className="relative min-h-[calc(100vh-56px)] sm:px-16 md:px-0"><div className={`${styles.waitlistBackground} fixed left-0 top-0 -z-10 h-full w-full`} />@@ -31,7 +27,7 @@ export function Waitlist({ searchParams }: WaitlistPageProps) {getting early access</Balancer></p>- <WaitlistForm ref={searchParams.ref} />+ <WaitlistForm /></div></div></main>diff --git a/apps/web/src/components/landing/waitlist/waitlist-form.tsx b/apps/web/src/components/landing/waitlist/waitlist-form.tsxindex 3672678d..707e6706 100644--- a/apps/web/src/components/landing/waitlist/waitlist-form.tsx+++ b/apps/web/src/components/landing/waitlist/waitlist-form.tsx@@ -27,15 +27,11 @@ const waitlistFormSchema = z.object({name: z.string().min(1, 'Please enter your name'),email: z.string().email(),intention: z.string(),- ref: z.string().optional(),});export type WaitlistFormSchema = z.infer<typeof waitlistFormSchema>;-export interface WaitlistFormProps {- ref?: string;-}-export function WaitlistForm({ ref }: WaitlistFormProps) {+export function WaitlistForm() {const [state, setState] = useState<'error' | 'idle' | 'submitting' | 'success'>('idle');const isSubmitting = state === 'submitting';@@ -70,7 +66,6 @@ export function WaitlistForm({ ref }: WaitlistFormProps) {render={({ field }) => (<FormItem><FormControl>- <input type="hidden" name="ref" value={ref} /><InputclassName={clsx({'rounded-b-none rounded-t-xl border border-b-0 border-red-600 bg-white/50 backdrop-blur-md dark:border-red-400 dark:bg-neutral-950/50':diff --git a/packages/db/schema.prisma b/packages/db/schema.prismaindex efc36c4d..12a443df 100644--- a/packages/db/schema.prisma+++ b/packages/db/schema.prisma@@ -369,7 +369,6 @@ model Waitlist {id Int @id @default(autoincrement())name Stringemail String- referrer String?intention WaitlistIntention}