refactor: implement login state management and navigation flow in appointment components

This commit is contained in:
hamed
2025-11-17 15:00:40 +03:30
parent 6c787fe5fa
commit 5a58c13a4e
5 changed files with 78 additions and 27 deletions
+3 -1
View File
@@ -5,7 +5,7 @@ import { InputAdornment, Button } from "@mui/material";
import Link from "next/link";
import { useState } from "react";
function LogInPage({ setIsSendMsg, num, setNum, setUuid, matchedCity }) {
function LogInPage({ setIsSendMsg, num, setNum, setUuid, matchedCity, setStep }) {
const [error, setError] = useState({ valid: true, text: "" });
const [loading, setLoading] = useState(false);
@@ -23,6 +23,8 @@ function LogInPage({ setIsSendMsg, num, setNum, setUuid, matchedCity }) {
if (response.uuid) {
setIsSendMsg(true);
setUuid(response.uuid);
// به مرحله بعد (VerificationPage) می‌رود
setStep && setStep(2);
}
})
.catch(() => {