import { useRef, useState } from "react" import Link from "next/link"; import { Button } from "@mui/material"; import OTPForm from "./element/OTPForm"; import EditLogin from "../icons/EditLogin"; import RetryLogin from "../icons/RetryLogin"; import ArrowRightS from "../icons/ArrowRightS"; const time_resend_code = 120; function SetCodePage({ setIsSendMsg, link, setStep }) { const retryIcon = useRef(); const [timer, setTimer] = useState(0); const handleTimer = () => { setTimer('loading'); setTimeout(() => { setTimer(time_resend_code); let timePresent = time_resend_code; const timerInterval = setInterval(() => { timePresent--; setTimer(timePresent); !timePresent && clearInterval(timerInterval) }, 1000); }, 1000); } const handleOTP = (e) => { e.target.nextElementSibling && e.target.nextElementSibling.focus() } return (
کد تایید را وارد نمایید
کد تایید برای شماره 09013261200 ارسال شد.