diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index 3956ab4..ea76592 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -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) diff --git a/src/features/auth/components/StepEnterPassword.tsx b/src/features/auth/components/StepEnterPassword.tsx index 7210ca0..7897136 100644 --- a/src/features/auth/components/StepEnterPassword.tsx +++ b/src/features/auth/components/StepEnterPassword.tsx @@ -2,6 +2,7 @@ import Button from '@/components/button/PrimaryButton'; import { EyeToggleIcon } from '@/components/icons/EyeToggleIcon'; import InputField from '@/components/input/InputField'; import { AUTH_PAGE_ELEMENT } from '@/enums'; +import Image from 'next/image'; import React from 'react' type Props = { @@ -15,37 +16,49 @@ type Props = { function StepEnterPassword({ onSubmit, onChange, onClick, value, passwordVisible, rememberMe }: Props) { return ( -
-
- -
-
ورود به سیستم
-

کلمه عبور خود را وارد نمایید.

-
- - - -
- + +
+ login banner +
+
+
+
ورود به سیستم
+

کلمه عبور خود را وارد نمایید.

+
+ + + +
+ -
- {/* TODO: customize checkbox */} - -
+
+ {/* TODO: customize checkbox */} + +
+
+
+
+
- ) }