Preparing the repository

This commit is contained in:
charles-gauthereau
2025-01-02 18:30:20 +01:00
parent 55b7c4d80d
commit 7f39ade34a
3 changed files with 10 additions and 3 deletions
@@ -15,6 +15,7 @@ import {PasswordInput} from "@/components/wrappers/auth/PaswordInput/password-in
import {signInAction} from "@/features/auth/auth.action";
import {LoginSchema, LoginType} from "@/components/wrappers/auth/login/loginForm/login-form.schema";
import {SocialAuthButton} from "@/components/wrappers/auth/login/socialAuth/socialAuthButtons/SocialAuthButton";
import {env} from "@/env.mjs";
export type loginFormProps = {
defaultValues?: LoginType;
@@ -99,7 +100,11 @@ export const LoginForm = (props: loginFormProps) => {
</Link>
</div>
</Form>
{env.NEXT_PUBLIC_GOOGLE_AUTH ?
<SocialAuthButton/>
:null}
</CardContent>
</Card>
</TooltipProvider>
@@ -2,14 +2,12 @@
import {signInAction} from "@/features/auth/auth.action";
import {Button} from "@/components/ui/button";
import Image from "next/image";
import {env} from "@/env.mjs";
export type SocialAuthButtonProps = {}
export const SocialAuthButton = (props: SocialAuthButtonProps) => {
return (
<div className="flex flex-col gap-4 mt-5">
{process.env.NEXT_PUBLIC_GOOGLE_AUTH == 'true' ?
<Button
onClick={(e) => {
e.preventDefault();
@@ -19,7 +17,6 @@ export const SocialAuthButton = (props: SocialAuthButtonProps) => {
<Image src="/google-icon.png" alt="Google OAuth" width={25} height={25}/>
Sign in with google
</Button>
:null}
</div>
)
}