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.

some cleanup

Kiran K83fa20676d58
diff --git a/apps/web/app/app.dub.co/(auth)/register/form.tsx b/apps/web/app/app.dub.co/(auth)/register/form.tsx
index cc332a2c9f..c2f5234299 100644
--- a/apps/web/app/app.dub.co/(auth)/register/form.tsx
+++ b/apps/web/app/app.dub.co/(auth)/register/form.tsx
@@ -3,7 +3,7 @@
import { SignUpEmail } from "./signup-email";
import { SignUpOAuth } from "./signup-oauth";
-export default function RegisterForm() {
+export const RegisterForm = () => {
return (
<>
<SignUpEmail />
diff --git a/apps/web/app/app.dub.co/(auth)/register/page.tsx b/apps/web/app/app.dub.co/(auth)/register/page.tsx
index 70b7eeff01..b690e5691d 100644
--- a/apps/web/app/app.dub.co/(auth)/register/page.tsx
+++ b/apps/web/app/app.dub.co/(auth)/register/page.tsx
@@ -1,6 +1,6 @@
import AuthLayout from "@/ui/layout/auth-layout";
import { constructMetadata } from "@dub/utils";
-import RegisterForm from "./form";
+import { RegisterForm } from "./form";
export const metadata = constructMetadata({
title: `Create your ${process.env.NEXT_PUBLIC_APP_NAME} account`,
diff --git a/apps/web/app/app.dub.co/(auth)/register/signup-email.tsx b/apps/web/app/app.dub.co/(auth)/register/signup-email.tsx
index 7ec1e9c72b..4fc722976f 100644
--- a/apps/web/app/app.dub.co/(auth)/register/signup-email.tsx
+++ b/apps/web/app/app.dub.co/(auth)/register/signup-email.tsx
@@ -10,7 +10,6 @@ import { useRouter } from "next/navigation";
import { useForm } from "react-hook-form";
import { toast } from "sonner";
-
export const SignUpEmail = () => {
const router = useRouter();
@@ -21,6 +20,10 @@ export const SignUpEmail = () => {
formState: { errors, isDirty },
} = useForm<z.infer<typeof signUpSchema>>({
resolver: zodResolver(signUpSchema),
+ defaultValues: {
+ email: "[email protected]",
+ password: "12345678Ab@",
+ },
});
const { executeAsync, result, status, isExecuting } = useAction(
@@ -86,4 +89,4 @@ export const SignUpEmail = () => {
</form>
</>
);
-}
+};
diff --git a/apps/web/lib/actions/create-user-account.ts b/apps/web/lib/actions/create-user-account.ts
index 85053a5963..a1804bd71c 100644
--- a/apps/web/lib/actions/create-user-account.ts
+++ b/apps/web/lib/actions/create-user-account.ts
@@ -42,7 +42,7 @@ export const createUserAccountAction = actionClient
if (await redis.sismember("disposableEmailDomains", email.split("@")[1])) {
throw new Error(
- "This email domain is not allowed to sign up. If you think this is a mistake, please contact us at [email protected]",
+ "Disposable email addresses are not allowed. If you think this is a mistake, please contact us at [email protected]",
);
}