mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 11:12:00 +10:00
- implement disable_email_auth env var
- add sync crowdin translations github action
This commit is contained in:
@ -14,6 +14,7 @@ import {
|
||||
FormMessage,
|
||||
Input,
|
||||
} from "@reactive-resume/ui";
|
||||
import { cn } from "@reactive-resume/utils";
|
||||
import { useRef } from "react";
|
||||
import { Helmet } from "react-helmet-async";
|
||||
import { useForm } from "react-hook-form";
|
||||
@ -21,12 +22,16 @@ import { Link } from "react-router-dom";
|
||||
import { z } from "zod";
|
||||
|
||||
import { useLogin } from "@/client/services/auth";
|
||||
import { useAuthProviders } from "@/client/services/auth/providers";
|
||||
|
||||
type FormValues = z.infer<typeof loginSchema>;
|
||||
|
||||
export const LoginPage = () => {
|
||||
const { login, loading } = useLogin();
|
||||
|
||||
const { providers } = useAuthProviders();
|
||||
const emailAuthDisabled = !providers || !providers.includes("email");
|
||||
|
||||
const formRef = useRef<HTMLFormElement>(null);
|
||||
usePasswordToggle(formRef);
|
||||
|
||||
@ -53,7 +58,7 @@ export const LoginPage = () => {
|
||||
|
||||
<div className="space-y-1.5">
|
||||
<h2 className="text-2xl font-semibold tracking-tight">{t`Sign in to your account`}</h2>
|
||||
<h6>
|
||||
<h6 className={cn(emailAuthDisabled && "hidden")}>
|
||||
<span className="opacity-75">{t`Don't have an account?`}</span>
|
||||
<Button asChild variant="link" className="px-1.5">
|
||||
<Link to="/auth/register">
|
||||
@ -64,7 +69,7 @@ export const LoginPage = () => {
|
||||
</h6>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className={cn(emailAuthDisabled && "hidden")}>
|
||||
<Form {...form}>
|
||||
<form
|
||||
ref={formRef}
|
||||
|
||||
Reference in New Issue
Block a user