validate otp

This commit is contained in:
Muhammad Fajar
2022-11-11 15:38:07 +07:00
parent 3e30ce6e90
commit 91e44fcb41
14 changed files with 157 additions and 529 deletions

View File

@@ -11,7 +11,8 @@ import Image from '../../components/Image';
import { LoginEmailForm, LoginPhoneForm } from '../../sections/auth/login';
import Logo from '../../components/Logo';
// react
import { useState } from 'react';
import { useState, useEffect } from 'react';
import { useLocation } from 'react-router-dom';
// ----------------------------------------------------------------------
@@ -36,13 +37,20 @@ const ContentStyle = styled(Card)(({ theme }) => ({
export default function Login() {
const { method } = useAuth();
const location = useLocation();
const [formPhone, setFormPhone] = useState(false);
// const { setForm } = location.state;
const handlerChange = (event: any, setForm: boolean) => {
event.preventDefault();
setFormPhone(setForm);
};
useEffect(() => {
console.log('setForm');
// setFormPhone(setForm ? setForm : true);
}, []);
return (
<Page title="Login">
<RootStyle>