last update

This commit is contained in:
Ehsan
2025-05-23 18:06:48 +03:30
parent 378a42436b
commit 660117f6e8
4 changed files with 14 additions and 7 deletions
+4 -4
View File
@@ -19,9 +19,9 @@ function LogInPage({ setIsSendMsg, num, setNum, matchedCity }) {
setError(checkedNum); setError(checkedNum);
const digits = formatted.replace(/\D/g, ""); const digits = formatted.replace(/\D/g, "");
setNum(formatted); setNum(formatted);
if (digits.length === 9) { // if (digits.length === 9) {
handleReq(); // handleReq();
} // }
}; };
const handleReq = () => { const handleReq = () => {
setLoading(true); setLoading(true);
@@ -30,7 +30,7 @@ function LogInPage({ setIsSendMsg, num, setNum, matchedCity }) {
.then((response) => { .then((response) => {
setLoading(false); setLoading(false);
if (response) { if (response) {
setNum(""); // setNum("");
setIsSendMsg(true); setIsSendMsg(true);
} }
}) })
+5 -3
View File
@@ -36,9 +36,9 @@ function SetCodePage({ setIsSendMsg, link, num, setStep }) {
if (newCode.join("").length === 4 && isError) { if (newCode.join("").length === 4 && isError) {
setIsError(false); setIsError(false);
} }
if (newCode.join("").length === 4) { // if (newCode.join("").length === 4) {
handleReq(); // handleReq();
} // }
setCode(newCode); setCode(newCode);
@@ -61,6 +61,8 @@ function SetCodePage({ setIsSendMsg, link, num, setStep }) {
}, 1000); }, 1000);
}; };
console.log(num);
const handleReq = () => { const handleReq = () => {
setLoading(true); setLoading(true);
request request
+1
View File
@@ -8,6 +8,7 @@ import LayoutRegister from "./LayoutRegister";
function RegisterPage({ matchedCity }) { function RegisterPage({ matchedCity }) {
const [isSendMsg, setIsSendMsg] = useState(false); const [isSendMsg, setIsSendMsg] = useState(false);
const [num, setNum] = useState(""); const [num, setNum] = useState("");
console.log(num);
return ( return (
<LayoutRegister matchedCity={matchedCity}> <LayoutRegister matchedCity={matchedCity}>
+4
View File
@@ -15,9 +15,13 @@ const api = axios.create({
api.interceptors.response.use( api.interceptors.response.use(
(response) => { (response) => {
console.log(response);
return response.data; return response.data;
}, },
(error) => { (error) => {
console.log(error);
return error; return error;
} }
); );