import Link from "next/link"; import { CodeIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { providerMap, signIn } from "@/lib/auth"; import { getTranslations } from "next-intl/server"; import { FaGithub, FaGoogle } from "react-icons/fa"; import { CredentialsSignUpForm } from "@/components/credentials-sign-up-form"; interface ProviderIconProps { providerId: string; } const ProviderIcon = ({ providerId }: ProviderIconProps) => { switch (providerId) { case "github": return ; case "google": return ; default: return null; } }; interface SignUpPageProps { searchParams: Promise<{ callbackUrl: string | undefined; }>; } export default async function SignInPage({ searchParams }: SignUpPageProps) { const { callbackUrl } = await searchParams; const t = await getTranslations("SignUpForm"); return (
Judge4c

{t("title")}

{t("description")}

{t("or")}
{Object.values(providerMap).map((provider) => { return (
{ "use server"; await signIn(provider.id, { redirectTo: callbackUrl, }); }} >
); })}
{t("haveAccount")}{" "} {t("signIn")}
); }