import { FC } from 'react'; import { Main } from '@/app/ui/Main'; import { authConfig } from "@/app/lib/auth"; import { SignInButton } from '@/app/ui/SignInButton'; import Image from 'next/image'; import { getTranslations } from "next-intl/server"; type Provider = { id: string; name: string; type: string; style: { logo: string; bg: string; text: string; }; }; function getProviders(): Provider[] { const providerKeys: (keyof Provider)[] = ["id", "name", "type", "style"]; return authConfig.providers.map((provider) => getKeyValuesFromObject(provider, providerKeys) ); } function getKeyValuesFromObject(obj: any, keys: (keyof T)[]): T { return keys.reduce((acc, key) => { if (obj[key]) { acc[key] = obj[key]; } return acc; }, {} as T); } const Page:FC = async () => { const providers = await getProviders(); const t = await getTranslations("login-page"); return (

{t("main-card.title-1")} {t("main-card.title-2")} {t("main-card.title-3")}

{t("main-card.text-1")}

{t("main-card.text-2")}

{ Object.values(providers).map((provider) => (
)) }

{t("card-1.title")}

{t("card-1.text")}

{t("card-2.title")}

{t("card-2.text")}

Boje označavaju status računa

{t("card-3.title")}

{t("card-3.text")}

); } export default Page;