- implement disable_email_auth env var

- add sync crowdin translations github action
This commit is contained in:
Amruth Pillai
2023-11-21 09:44:37 +01:00
parent 635f743e56
commit 1825fc3283
84 changed files with 2693 additions and 2341 deletions

View File

@ -2,20 +2,36 @@ import { t } from "@lingui/macro";
import { GithubLogo, GoogleLogo } from "@phosphor-icons/react";
import { Button } from "@reactive-resume/ui";
export const SocialAuth = () => (
<div className="grid grid-cols-2 gap-4">
<Button asChild size="lg" className="w-full !bg-[#222] !text-white hover:!bg-[#222]/80">
<a href="/api/auth/github">
<GithubLogo className="mr-3 h-4 w-4" />
{t`GitHub`}
</a>
</Button>
import { useAuthProviders } from "@/client/services/auth/providers";
<Button asChild size="lg" className="w-full !bg-[#4285F4] !text-white hover:!bg-[#4285F4]/80">
<a href="/api/auth/google">
<GoogleLogo className="mr-3 h-4 w-4" />
{t`Google`}
</a>
</Button>
</div>
);
export const SocialAuth = () => {
const { providers } = useAuthProviders();
if (!providers || providers.length === 0) return null;
return (
<div className="grid grid-cols-2 gap-4">
{providers.includes("github") && (
<Button asChild size="lg" className="w-full !bg-[#222] !text-white hover:!bg-[#222]/80">
<a href="/api/auth/github">
<GithubLogo className="mr-3 h-4 w-4" />
{t`GitHub`}
</a>
</Button>
)}
{providers.includes("google") && (
<Button
asChild
size="lg"
className="w-full !bg-[#4285F4] !text-white hover:!bg-[#4285F4]/80"
>
<a href="/api/auth/google">
<GoogleLogo className="mr-3 h-4 w-4" />
{t`Google`}
</a>
</Button>
)}
</div>
);
};