From 5aadd3793d80b4d68116cf9b3d6d69e8ae72deeb Mon Sep 17 00:00:00 2001 From: "Rayyan (Rayy)" Date: Tue, 10 Oct 2023 08:15:02 +0000 Subject: [PATCH] Add human friendly error codes --- src/pages/Signin.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/pages/Signin.js b/src/pages/Signin.js index 705bd8a..be4eaeb 100644 --- a/src/pages/Signin.js +++ b/src/pages/Signin.js @@ -49,7 +49,17 @@ export function Signin( props ) { }) .catch( (code) => { //console.log(code) - setErrorCode( code ) + // setErrorCode( code ) + switch(code) { + case"auth/invalid-email": + setErrorCode("The email address is invalid") + break + case"auth/invalid-login-credentials": + setErrorCode("Credentials supplied is not in our system") + break + default: + break + } }) }