diff --git a/native-example/yarn.lock b/native-example/yarn.lock index 2ed9e1e..5e50990 100644 --- a/native-example/yarn.lock +++ b/native-example/yarn.lock @@ -2897,7 +2897,7 @@ "version" "0.1.2" "easybase-react@github:easybase/easybase-react#dev": - "resolved" "git+ssh://git@github.com/easybase/easybase-react.git#3470c615f0f289ed0bab0091ceb166b76fdf3050" + "resolved" "git+ssh://git@github.com/easybase/easybase-react.git#606faf0172107d803a3f42d6919a39c5d69920a5" "version" "2.1.15" dependencies: "easybasejs" "4.2.13" diff --git a/src/ui/NativeAuth/pages/SignIn.tsx b/src/ui/NativeAuth/pages/SignIn.tsx index 04e49e0..75ce5fb 100644 --- a/src/ui/NativeAuth/pages/SignIn.tsx +++ b/src/ui/NativeAuth/pages/SignIn.tsx @@ -10,14 +10,20 @@ export default function ({ setCurrentPage, dictionary, toast }: INativePage) { const onSubmit = async (formData: Record) => { console.log("Clicked SIGNIN, formData:", formData); - const signInRes = await signIn(formData.email, formData.password); - if (!signInRes.success) { - if (signInRes.errorCode === "NoUserExists") { - toast(dictionary.errorUserDoesNotExist!) - } else if (signInRes.errorCode === "BadFormat") { - reset(); - toast(dictionary.errorBadInputFormat!) + console.log(signIn); + try { + const signInRes = await signIn(formData.email, formData.password); + console.log(signInRes); + if (!signInRes.success) { + if (signInRes.errorCode === "NoUserExists") { + toast(dictionary.errorUserDoesNotExist!) + } else if (signInRes.errorCode === "BadFormat") { + reset(); + toast(dictionary.errorBadInputFormat!) + } } + } catch (error) { + console.log("ERROR:", error); } // Will automatically change views }