import Image from "next/image"; import { getTranslations } from "next-intl/server"; import Link from "@/components/link"; import { ContentCard, EmptyState } from "@/components/public/ui"; import { excerpt } from "@/lib/format"; import { formatDate } from "@/lib/format-date"; import { getNewsList } from "@/lib/services/news-list"; export const metadata = { title: "News" }; export default async function NewsPage() { const t = await getTranslations("pages.news"); const articles = await getNewsList(30); return (
{articles.length === 0 ? ( {t("noArticles")} ) : (
{articles.map((a) => ( {a.image ? (
) : (
)}

{a.title}

{formatDate(a.createdAt, "date", "")}

{excerpt(a.shortStory, 150)}

))}
)}
); }