import cx from 'classnames' import dayjs from 'dayjs' import { Link } from 'components/Link' import { ArrowRightIcon } from '@primer/octicons-react' import { FeaturedLink, useProductLandingContext } from 'components/context/ProductLandingContext' import { useTranslation } from 'components/hooks/useTranslation' import { TruncateLines } from 'components/TruncateLines' export const FeaturedArticles = () => { const { featuredArticles = [], changelog, whatsNewChangelog, changelogUrl, } = useProductLandingContext() const { t } = useTranslation('toc') return (
{featuredArticles.map((section, i) => { return (
) })} {changelog && (
{ return { title: link.title, date: link.date, href: link.href, } })} />
)}
) } type ArticleListProps = { title?: string viewAllHref?: string articles: Array maxLines?: number } export const ArticleList = ({ title, viewAllHref, articles, maxLines = 2 }: ArticleListProps) => { return ( <> {title && (

{title}

{viewAllHref && ( View all )}
)} ) }