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.

Update register+verify pages

Tim Wilson69b8b7197ce9
diff --git a/apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx b/apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx
index e19b57bd1f..3269afe142 100644
--- a/apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(auth)/(default)/register/page-client.tsx
@@ -1,11 +1,13 @@
"use client";
+import { AuthAlternativeBanner } from "@/ui/auth/auth-alternative-banner";
import {
RegisterProvider,
useRegisterContext,
} from "@/ui/auth/register/context";
import { SignUpForm } from "@/ui/auth/register/signup-form";
import { VerifyEmailForm } from "@/ui/auth/register/verify-email-form";
+import { AuthLayout } from "@/ui/layout/auth-layout";
import { truncate } from "@dub/utils";
import { Program } from "@prisma/client";
import Link from "next/link";
@@ -24,35 +26,41 @@ export default function RegisterPageClient({
}) {
return (
<RegisterProvider email={email} lockEmail={lockEmail}>
- <div className="mx-auto my-10 w-full max-w-[480px] md:mt-20 lg:mt-20">
- <RegisterFlow program={program} />
- </div>
+ <RegisterFlow program={program} />
</RegisterProvider>
);
}
function SignUp({ program }: { program?: PartialProgram }) {
return (
- <>
- {program && <PartnerBanner program={program} />}
- <div className="rounded-lg border border-neutral-200 bg-white p-8 pb-10">
- <h1 className="text-lg font-medium text-neutral-800">
- Create a Dub Partner account
+ <AuthLayout showTerms>
+ <div className="w-full max-w-sm">
+ {program && <PartnerBanner program={program} />}
+ <h1 className="text-center text-xl font-semibold">
+ Create your Dub Partner account
</h1>
<div className="mt-8">
<SignUpForm methods={["email", "google"]} />
</div>
+ <p className="mt-6 text-center text-sm font-medium text-neutral-500">
+ Already have an account?&nbsp;
+ <Link
+ href={`${program ? `/${program.slug}` : ""}/login`}
+ className="font-semibold text-neutral-700 transition-colors hover:text-neutral-900"
+ >
+ Sign in
+ </Link>
+ </p>
+
+ <div className="mt-12 w-full">
+ <AuthAlternativeBanner
+ text="Looking for a Dub workspace account?"
+ cta="Sign up at app.dub.co"
+ href="https://app.dub.co/register"
+ />
+ </div>
</div>
- <p className="mt-4 text-center text-sm text-neutral-500">
- Already have an account?&nbsp;
- <Link
- href={`${program ? `/${program.slug}` : ""}/login`}
- className="font-semibold text-neutral-500 underline underline-offset-2 transition-colors hover:text-black"
- >
- Sign in
- </Link>
- </p>
- </>
+ </AuthLayout>
);
}
@@ -60,31 +68,24 @@ function Verify() {
const { email } = useRegisterContext();
return (
- <>
- <div className="rounded-lg border border-neutral-200 bg-white p-8 pb-10">
- <h1 className="text-lg font-medium text-neutral-800">
- Verify your email address
- </h1>
- <p className="mt-3 text-sm text-neutral-500">
- Enter the six digit verification code sent to{" "}
- <strong className="font-medium text-neutral-600" title={email}>
- {truncate(email, 30)}
- </strong>
- </p>
- <div className="mt-8">
+ <AuthLayout>
+ <div className="w-full max-w-sm">
+ <div className="flex flex-col items-center gap-1 text-center">
+ <h3 className="text-center text-xl font-semibold">
+ Verify your email address
+ </h3>
+ <p className="text-base font-medium text-neutral-500">
+ Enter the six digit verification code sent to{" "}
+ <strong className="font-semibold text-neutral-600" title={email}>
+ {truncate(email, 30)}
+ </strong>
+ </p>
+ </div>
+ <div className="mt-12">
<VerifyEmailForm />
</div>
</div>
- <p className="mt-4 text-center text-sm text-neutral-500">
- Already have an account?&nbsp;
- <Link
- href="/login"
- className="font-semibold text-neutral-500 underline underline-offset-2 transition-colors hover:text-black"
- >
- Sign in
- </Link>
- </p>
- </>
+ </AuthLayout>
);
}
diff --git a/apps/web/ui/layout/auth-layout.tsx b/apps/web/ui/layout/auth-layout.tsx
index ddb1d5df5c..f087f32bb0 100644
--- a/apps/web/ui/layout/auth-layout.tsx
+++ b/apps/web/ui/layout/auth-layout.tsx
@@ -9,7 +9,7 @@ export const AuthLayout = ({
<div className="flex min-h-screen w-full flex-col items-center justify-between">
{/* Empty div to help center main content */}
<div className="grow basis-0">
- <div className="h-20" />
+ <div className="h-24" />
</div>
<ClientOnly className="relative flex w-full flex-col items-center justify-center px-4">