fix: error message when email exists (#16022)

* fix: error message when email exists

* chore: change postion of error

---------

Co-authored-by: Hariom Balhara <hariombalhara@gmail.com>
This commit is contained in:
Udit Takkar
2024-08-22 14:20:41 +00:00
committed by GitHub
co-authored by Hariom Balhara
parent 8a972a74c6
commit c821f15a14
2 changed files with 9 additions and 10 deletions
+8 -9
View File
@@ -321,15 +321,6 @@ export default function Signup({
<HeadSeo title={t("sign_up")} description={t("sign_up")} />
{/* Left side */}
<div className="ml-auto mr-auto mt-0 flex w-full max-w-xl flex-col px-4 pt-6 sm:px-16 md:px-20 lg:mt-12 2xl:px-28">
{/* Header */}
{errors.apiError && (
<Alert
className="mb-3"
severity="error"
message={errors.apiError?.message}
data-testid="signup-error-message"
/>
)}
<div className="flex flex-col gap-2">
<h1 className="font-cal text-[28px] leading-none ">
{IS_CALCOM ? t("create_your_calcom_account") : t("create_your_account")}
@@ -408,6 +399,14 @@ export default function Signup({
onChange={() => handleConsentChange(COOKIE_CONSENT)}
description={t("cookie_consent_checkbox")}
/>
{errors.apiError && (
<Alert
className="mb-3"
severity="error"
message={errors.apiError?.message}
data-testid="signup-error-message"
/>
)}
<Button
type="submit"
className="my-2 w-full justify-center"
+1 -1
View File
@@ -78,7 +78,7 @@ const processResult = (
case "username_exists":
return {
statusCode: 418,
message: "A user exists with that username",
message: "A user exists with that username or email",
};
case "is_premium":
return { statusCode: 402, message: "This is a premium username." };