--- import { ArticleItem } from "@components/ArticleItem"; import UIString from "@components/UIString"; import { getLanguageFromURL } from "@utils/url"; import { sortArtcilesByDate } from "@utils/articles"; import EmptyList from "./EmptyList.astro"; import TranslatedLink from "@components/TranslatedLink"; export interface Props { articles: ArticleType[]; length?: number | undefined; } const { articles, length = 5 } = Astro.props as Props; const lang = getLanguageFromURL(Astro.url.pathname); const recent = sortArtcilesByDate(articles); const isEmpty = recent.length === 0; ---

{!isEmpty ? recent.slice(0, length).map((article) => ) : }