chore: sync auth page password step styles

This commit is contained in:
Mahyar Khanbolooki
2025-07-02 21:39:09 +03:30
parent f7a9fb5e2a
commit 8a4b68b7a9
2 changed files with 44 additions and 30 deletions
+3 -2
View File
@@ -66,7 +66,6 @@ function AuthIndex({ }: Props) {
setNumber(() => e.target.value)
}
else if (e.target.name == AUTH_PAGE_ELEMENT.INPUT_PASSWORD) {
console.log(e.target.value, 's');
setPassword(() => e.target.value)
}
else if (e.target.name == AUTH_PAGE_ELEMENT.INPUT_PASSWORD_REPEAT) {
@@ -114,7 +113,7 @@ function AuthIndex({ }: Props) {
e.preventDefault();
if (step == AUTH_STEP.ENTER_NUMBER) {
if (false) {
if (true) {
setStep(AUTH_STEP.ENTER_PASSWORD)
} else {
setStep(AUTH_STEP.ENTER_OTP);
@@ -123,7 +122,9 @@ function AuthIndex({ }: Props) {
else if (step == AUTH_STEP.ENTER_PASSWORD) {
try {
// await loginMutation.mutateAsync({ phone: number, password })
useAuthStore.getState().isAuthenticated = true;
console.log("Logged in")
redirect("/")
}
catch (e) {
console.log("Wrong credentials: ", e)