import Link from 'next/link' import { ChevronUpIcon } from '@primer/octicons-react' import cx from 'classnames' import { useProductLandingContext, Product } from 'components/context/ProductLandingContext' import { useState } from 'react' const maxArticles = 10 export const AllArticlesProduct = () => { const { product } = useProductLandingContext() return (
{Object.entries(product.categories).map(([key, category]) => { if (category.standalone) { return null } return })}
) } const ArticleList = ({ category }: { category: Product['categories'][0] }) => { const [isShowingMore, setIsShowingMore] = useState(false) const numArticles = Object.keys(category.articles || {}).length return (

{category.title}

{numArticles > maxArticles && !isShowingMore && ( )}
) }