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);
const digits = formatted.replace(/\D/g, "");
setNum(formatted);
if (digits.length === 9) {
handleReq();
}
// if (digits.length === 9) {
// handleReq();
// }
};
const handleReq = () => {
setLoading(true);
@@ -30,7 +30,7 @@ function LogInPage({ setIsSendMsg, num, setNum, matchedCity }) {
.then((response) => {
setLoading(false);
if (response) {
setNum("");
// setNum("");
setIsSendMsg(true);
}
})
+5 -3
View File
@@ -36,9 +36,9 @@ function SetCodePage({ setIsSendMsg, link, num, setStep }) {
if (newCode.join("").length === 4 && isError) {
setIsError(false);
}
if (newCode.join("").length === 4) {
handleReq();
}
// if (newCode.join("").length === 4) {
// handleReq();
// }
setCode(newCode);
@@ -61,6 +61,8 @@ function SetCodePage({ setIsSendMsg, link, num, setStep }) {
}, 1000);
};
console.log(num);
const handleReq = () => {
setLoading(true);
request
+1
View File
@@ -8,6 +8,7 @@ import LayoutRegister from "./LayoutRegister";
function RegisterPage({ matchedCity }) {
const [isSendMsg, setIsSendMsg] = useState(false);
const [num, setNum] = useState("");
console.log(num);
return (
<LayoutRegister matchedCity={matchedCity}>
+4
View File
@@ -15,9 +15,13 @@ const api = axios.create({
api.interceptors.response.use(
(response) => {
console.log(response);
return response.data;
},
(error) => {
console.log(error);
return error;
}
);