import Link from 'next/link' import { useState } from 'react' import { ChevronUpIcon } from '@primer/octicons-react' import { SiteTreePage, useMainContext } from 'components/context/MainContext' const maxArticles = 10 export const ProductArticlesList = () => { const { productSiteTreeNew } = useMainContext() if (!productSiteTreeNew) { return null } return (
{productSiteTreeNew.childPages.map((childPage) => { if (childPage.page.documentType === 'article') { return null } return })}
) } const ArticleList = ({ page }: { page: SiteTreePage }) => { const [isShowingMore, setIsShowingMore] = useState(false) return (

{page.page.title}

{!isShowingMore && page.childPages.length > maxArticles && ( )}
) }