upd : login

Deskripsi:
- done resend otp
- done check otp
- blm selesai localstorage nyimpen user id sementara

No Issues
This commit is contained in:
amel
2025-04-17 17:28:04 +08:00
parent b6b23742d2
commit 043d15bdd9
2 changed files with 29 additions and 14 deletions

View File

@@ -23,8 +23,10 @@ export default function ViewLogin({ onValidate }: Props) {
if (response.success) {
const otp = Math.floor(1000 + Math.random() * 9000)
const responseOtp = await apiSendOtp({ phone: `62${phone}`, otp })
console.log(responseOtp)
// return onValidate({ phone: `62${phone}`, otp })
if (responseOtp == 200) {
// localStorage.setItem('user', response.id)
return onValidate({ phone: `62${phone}`, otp })
}
}
return ToastAndroid.show(response.message, ToastAndroid.SHORT)
} catch (error) {