complete reset password code page - complete auth pages

This commit is contained in:
Alihaghighattalab
2024-08-05 13:40:02 +03:30
parent 277b13e5d8
commit a581dcce7e
4 changed files with 309 additions and 0 deletions
@@ -0,0 +1,42 @@
import { useState } from "react";
import OTPInput from "react-otp-input"
import { Link } from "react-router-dom"
export const ResetpasswordCodeForm = () => {
const [otp, setOtp] = useState('');
return (
<div
className="w-fit xl:w-1/2 xl:p-0 p-10 flex flex-col bg-auth-form justify-center items-center gap-y-[42px] rounded-3xl">
<img src="/svgs/logo/logo.svg" alt="logo" className="auth-logo-size" />
<div className="flex flex-col xl:-mr-24">
<div className="flex flex-col gap-y-5">
<span className="font-medium text-lg md:text-2xl xl:text-3xl text-primary-text-color">فراموشی رمز عبور</span>
<div className="flex flex-row gap-x-0.5 items-center">
<div className="flex flex-col sm:flex-row gap-0.5 items-center">
<p className="text-secondary-text-color font-normal text-xs md:text-sm">کد تایید ارسال شده به شماره 09376225448 را وارد کنید.</p>
<Link to="/auth/forgot-password">
<p className="text-primary-color font-bold text-xs md:text-sm cursor-pointer">ویرایش</p>
</Link>
</div>
</div>
</div>
<div className="mt-9 mb-[42px] flex w-full justify-center items-center" id="otp">
<OTPInput
containerStyle="otp-container"
value={otp}
onChange={setOtp}
numInputs={5}
renderInput={(props) => <input {...props} />}
inputStyle="otp-inputs"
/>
</div>
<div className="flex flex-col gap-y-[27px] items-center">
<p className="font-normal text-secondary-text-color text-base">30 ثانیه دیگر تا دریافت کد</p>
<button>تایید</button>
<p className="font-medium text-base text-primary-color">ارسال مجدد</p>
</div>
</div>
</div>
)
}
+14
View File
@@ -0,0 +1,14 @@
import React from "react"
import { ResetpasswordCodeForm } from "../../components/forms/reset-password-code-form"
export const ResetPasswordCode = () => {
return (
<React.Fragment>
<ResetpasswordCodeForm />
<div className="hidden xl:flex w-1/2 h-full justify-center items-center">
<img src="/svgs/auth/reset-password-code.svg" alt="send code reset password" className="auth-image-desktop" />
</div>
</React.Fragment>
)
}
+5
View File
@@ -7,6 +7,7 @@ import { Register } from "../pages/auth/register";
import { ResetPassword } from "../pages/auth/reset-password";
import { LoginWithCode } from "../pages/auth/login-with-code";
import { SendCode } from "../pages/auth/send-code";
import { ResetPasswordCode } from "../pages/auth/reset-password-code";
export const router = createBrowserRouter([
@@ -42,6 +43,10 @@ export const router = createBrowserRouter([
path: "send-code",
element: <SendCode />
},
{
path: "reset-password-code",
element: <ResetPasswordCode />
},
]
}
])