From 581f9533f07a1fc528d0d0e52a106e348aa372d8 Mon Sep 17 00:00:00 2001 From: Danh Date: Tue, 24 Oct 2023 16:49:16 +0700 Subject: [PATCH] resolve todo --- src/pages/Oauth/AuthForm/EmailLoginForm.tsx | 4 ++-- src/pages/Oauth/AuthForm/useAutoSignIn.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Oauth/AuthForm/EmailLoginForm.tsx b/src/pages/Oauth/AuthForm/EmailLoginForm.tsx index 46a91a7d7b..6b977862dc 100644 --- a/src/pages/Oauth/AuthForm/EmailLoginForm.tsx +++ b/src/pages/Oauth/AuthForm/EmailLoginForm.tsx @@ -27,7 +27,7 @@ const EmailLoginForm = ({ flowStatus }: { flowStatus: FlowStatus }) => { setIsShowVerify(false) } - const onVerifyEmail = (e: React.MouseEvent) => { + const onVerifyEmail = (e?: React.MouseEvent) => { e?.preventDefault?.() if (errorInput || isShowVerify || !inputEmail) return setIsShowVerify(true) @@ -37,7 +37,7 @@ const EmailLoginForm = ({ flowStatus }: { flowStatus: FlowStatus }) => { const onVerifyCode = async (data: { code: string; email: string }) => { const resp = await KyberOauth2.oauthUi.loginEmail(data) - console.debug('resp loginEmail', resp) + console.debug('oauth resp login email', resp) } const onSendCode = async ({ email }: { email: string }) => { diff --git a/src/pages/Oauth/AuthForm/useAutoSignIn.tsx b/src/pages/Oauth/AuthForm/useAutoSignIn.tsx index c733300de2..0e39adbbb0 100644 --- a/src/pages/Oauth/AuthForm/useAutoSignIn.tsx +++ b/src/pages/Oauth/AuthForm/useAutoSignIn.tsx @@ -9,7 +9,7 @@ const useAutoSignIn = ({ method, flowStatus: { flowReady, autoLoginMethod }, }: { - onClick: (e?: any) => void // todo + onClick: (e?: React.MouseEvent) => void method: LoginMethod flowStatus: FlowStatus }) => {