"use client"; import { DotLottieReact } from "@lottiefiles/dotlottie-react"; import { Link } from "@tanstack/react-router"; import { Tabs, TabsContent, TabsList, TabsTrigger, } from "@workspace/ui/components/tabs"; import { LanguageSwitch } from "@workspace/ui/composed/language-switch"; import { ThemeSwitch } from "@workspace/ui/composed/theme-switch"; import { useTranslation } from "react-i18next"; import { useGlobalStore } from "@/stores/global"; import EmailAuthForm from "./email/auth-form"; import { OAuthMethods } from "./oauth-methods"; import PhoneAuthForm from "./phone/auth-form"; export default function Main() { const { t } = useTranslation("auth"); const { common } = useGlobalStore(); const { site, auth } = common; const AUTH_METHODS = [ { key: "email", enabled: auth.email.enable, children: , }, { key: "mobile", enabled: auth.mobile.enable, children: , }, ].filter((method) => method.enabled); return ( {site.site_logo && ( )} {site.site_name} {site.site_desc} {t("verifyAccount", "Verify Your Account")} {t( "verifyAccountDesc", "Please login or register to continue" )} {AUTH_METHODS.length === 1 ? AUTH_METHODS[0]?.children : AUTH_METHODS[0] && ( {AUTH_METHODS.map((item) => ( {t(`methods.${item.key}`)} ))} {AUTH_METHODS.map((item) => ( {item.children} ))} )} {t("tos", "Terms of Service")} | {t("privacyPolicy", "Privacy Policy")} ); }
{site.site_desc}