From 453053179d93bd6f0e542b733335c20fb1763fb3 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Wed, 5 Jun 2024 11:52:56 +0200 Subject: [PATCH] fix ui: make login error more consistent --- frontend/app/components/Signup/SignupForm/SignupForm.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Signup/SignupForm/SignupForm.tsx b/frontend/app/components/Signup/SignupForm/SignupForm.tsx index ebc2ffe40..0a387e0e2 100644 --- a/frontend/app/components/Signup/SignupForm/SignupForm.tsx +++ b/frontend/app/components/Signup/SignupForm/SignupForm.tsx @@ -58,7 +58,11 @@ const SignupForm: React.FC = ({ tenants, errors, loading, signu 'g-recaptcha-response': token }).then((resp: any) => { if (resp && resp.errors && Array.isArray(resp.errors) && resp.errors.length > 0) { - resp.errors[0] ? toast.error(resp.errors[0]) : toast.error('Something went wrong'); + if ((resp.errors[0] as string).includes('in use')) { + toast.error("This email is already linked to an account or team on OpenReplay and can't be used again.") + } else { + resp.errors[0] ? toast.error(resp.errors[0]) : toast.error('Something went wrong'); + } } }); setState({ ...state, reload: true });