diff --git a/src/app/[lang]/(front-end)/(user-auth)/layout.tsx b/src/app/[lang]/(front-end)/(user-auth)/layout.tsx index e59a6f9..cb73bb4 100644 --- a/src/app/[lang]/(front-end)/(user-auth)/layout.tsx +++ b/src/app/[lang]/(front-end)/(user-auth)/layout.tsx @@ -37,7 +37,7 @@ const Auth = async ({ children, params }: Props) => { "https://images.unsplash.com/photo-1667133295315-820bb6481730?w=500&h=500&auto=format&fit=crop&q=100&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTE1fHxkZW50YWx8ZW58MHwxfDB8fHwy" } alt="Logo" - className="hidden aspect-square object-cover md:block xl:size-full" + className="hidden aspect-square rounded-md object-cover md:block xl:size-full" width={500} height={500} /> diff --git a/src/app/[lang]/(front-end)/(user-auth)/login/logInForm.tsx b/src/app/[lang]/(front-end)/(user-auth)/login/logInForm.tsx index db6e7a7..ccd5ed3 100644 --- a/src/app/[lang]/(front-end)/(user-auth)/login/logInForm.tsx +++ b/src/app/[lang]/(front-end)/(user-auth)/login/logInForm.tsx @@ -48,6 +48,7 @@ export const LoginForm = ({ dictionary }: Props) => { error={errors.email?.message} icon={} placeholder={dictionary?.emailPlaceholder || "Email"} + labelName="Email" /> { error={errors.password?.message} icon={} placeholder="*******" + labelName="Password" /> } placeholder="******" + labelName="confirm Password" />

{dictionary.ForgotPassword}

diff --git a/src/app/[lang]/admin/(dashboard)/page.tsx b/src/app/[lang]/admin/(dashboard)/page.tsx index 171b54c..1d0fdec 100644 --- a/src/app/[lang]/admin/(dashboard)/page.tsx +++ b/src/app/[lang]/admin/(dashboard)/page.tsx @@ -7,6 +7,6 @@ const Admin = async () => { ); -}; +}; export default Admin; diff --git a/src/app/[lang]/admin/(doctors-auth)/layout.tsx b/src/app/[lang]/admin/(doctors-auth)/layout.tsx index f86e634..5296234 100644 --- a/src/app/[lang]/admin/(doctors-auth)/layout.tsx +++ b/src/app/[lang]/admin/(doctors-auth)/layout.tsx @@ -27,7 +27,13 @@ const Auth = async ({ children, params }: Props) => {
- Logo + Logo
diff --git a/src/app/[lang]/admin/(doctors-auth)/login/page.tsx b/src/app/[lang]/admin/(doctors-auth)/login/page.tsx index fe5d70e..fabea1e 100644 --- a/src/app/[lang]/admin/(doctors-auth)/login/page.tsx +++ b/src/app/[lang]/admin/(doctors-auth)/login/page.tsx @@ -26,7 +26,7 @@ const Login = () => { console.log("🚀 ~ onSubmit ~ data:", data); setIsLoading(true); - const toastId = toast.loading("Processing..."); + const toastId = toast.loading("Submitting..."); try { const loginReq = await loginWithAuthJs({ email: data.email, @@ -52,6 +52,8 @@ const Login = () => { error={errors.email?.message} icon={} placeholder="Email address" + labelName="Email" + isShowError /> { error={errors.password?.message} icon={} placeholder="*******" + labelName="Password" + isShowError /> } placeholder="******" + labelName="Confirm Password" + isShowError />
); }; diff --git a/src/components/ui/inputComboForPassword.tsx b/src/components/ui/inputComboForPassword.tsx index 8fc7fbd..68098f7 100644 --- a/src/components/ui/inputComboForPassword.tsx +++ b/src/components/ui/inputComboForPassword.tsx @@ -11,6 +11,7 @@ interface Props extends React.ComponentProps<"input"> { error: string | undefined; wrapperClassName?: string; labelName?: string; + isShowError?: boolean; } export const InputComboForPassword = ({ @@ -20,6 +21,7 @@ export const InputComboForPassword = ({ wrapperClassName, error, labelName, + isShowError = true, ...props }: Props) => { const [isShow, setIsShow] = useState(false); @@ -47,6 +49,8 @@ export const InputComboForPassword = ({ {!isShow ? : }
+ + {isShowError &&

{error}

} ); }; diff --git a/src/schema/loginSchema.ts b/src/schema/loginSchema.ts index 61a43d2..0d269e5 100644 --- a/src/schema/loginSchema.ts +++ b/src/schema/loginSchema.ts @@ -3,12 +3,11 @@ import { z } from "zod"; export const loginFormSchema = z .object({ email: z.string().email(), - password: z.string().min(8, { message: "Password is too short" }).max(20, { message: "Password is too long" }), - + password: z.string().min(8, { message: "Password is too short" }).max(40, { message: "Password is too long" }), confirmPassword: z .string() .min(8, { message: "Password is too short" }) - .max(20, { message: "Password is too long" }), + .max(40, { message: "Password is too long" }), }) .refine((data) => data.password === data.confirmPassword, { message: "Passwords do not match",