'use client'; import { OAuthMethods } from '@/components/auth/oauth-methods'; import LanguageSwitch from '@/components/language-switch'; import ThemeSwitch from '@/components/theme-switch'; import useGlobalStore from '@/config/use-global'; import { DotLottieReact } from '@lottiefiles/dotlottie-react'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@workspace/ui/components/tabs'; import LoginLottie from '@workspace/ui/lotties/login.json'; import { useTranslations } from 'next-intl'; import Image from 'next/legacy/image'; import Link from 'next/link'; import EmailAuthForm from './email/auth-form'; import PhoneAuthForm from './phone/auth-form'; export default function Page() { const t = useTranslations('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')} {t('verifyAccountDesc')} {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')} | {t('privacyPolicy')} ); }
{site.site_desc}