- 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

@ -1,10 +1,12 @@
import { t } from "@lingui/macro";
import { cn } from "@reactive-resume/utils";
import { useMemo } from "react";
import { Link, matchRoutes, Outlet, useLocation } from "react-router-dom";
import { LocaleSwitch } from "@/client/components/locale-switch";
import { Logo } from "@/client/components/logo";
import { ThemeSwitch } from "@/client/components/theme-switch";
import { useAuthProviders } from "@/client/services/auth/providers";
import { SocialAuth } from "./_components/social-auth";
@ -13,8 +15,13 @@ const authRoutes = [{ path: "/auth/login" }, { path: "/auth/register" }];
export const AuthLayout = () => {
const location = useLocation();
const { providers } = useAuthProviders();
const emailAuthDisabled = !providers || !providers.includes("email");
const isAuthRoute = useMemo(() => matchRoutes(authRoutes, location) !== null, [location]);
if (!providers) return null;
return (
<div className="flex h-screen w-screen">
<div className="relative flex w-full flex-col justify-center gap-y-8 px-12 sm:mx-auto sm:basis-[420px] sm:px-0 lg:basis-[480px] lg:px-12">
@ -33,7 +40,7 @@ export const AuthLayout = () => {
{isAuthRoute && (
<>
<div className="flex items-center gap-x-4">
<div className={cn("flex items-center gap-x-4", emailAuthDisabled && "hidden")}>
<hr className="flex-1" />
<span className="text-xs font-medium">
{t({