import cx from 'classnames' import Link from 'next/link' import { format } from 'date-fns' 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 } const ArticleList = ({ title, viewAllHref, articles }: ArticleListProps) => { return ( <>

{title}

{viewAllHref && ( View all )}
) }