From 34fb5fba79ce354191cebdc44883b71c550f4323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Ho=C3=A0ng=20=C4=90=E1=BB=A9c?= Date: Mon, 16 Sep 2024 00:16:21 +0700 Subject: [PATCH] fix(web): Better message when signups are disabled (#374) * Clear disabled signups message * Change the message and center it --------- Co-authored-by: MohamedBassem --- apps/web/components/signin/CredentialsForm.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/apps/web/components/signin/CredentialsForm.tsx b/apps/web/components/signin/CredentialsForm.tsx index 65fec6a8..a505f699 100644 --- a/apps/web/components/signin/CredentialsForm.tsx +++ b/apps/web/components/signin/CredentialsForm.tsx @@ -108,7 +108,6 @@ function SignIn() { } function SignUp() { - const clientConfig = useClientConfig(); const form = useForm>({ resolver: zodResolver(zSignUpSchema), }); @@ -212,11 +211,7 @@ function SignUp() { ); }} /> - + Sign Up @@ -226,6 +221,8 @@ function SignUp() { } export default function CredentialsForm() { + const clientConfig = useClientConfig(); + return ( @@ -236,7 +233,11 @@ export default function CredentialsForm() { - + {clientConfig.auth.disableSignups ? ( +

Signups are currently disabled.

+ ) : ( + + )}
);