Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
785 Bytes
import ArticlePreview from './ArticlePreview';
import ListPagination from './ListPagination';
import React from 'react';
const ArticleList = props => {
if (!props.articles) {
return (
<div className="article-preview">Loading...</div>
);
}
if (props.articles.length === 0) {
return (
<div className="article-preview">
No articles are here... yet.
</div>
);
}
return (
<div>
{
props.articles.map(article => {
return (
<ArticlePreview article={article} key={article.slug} />
);
})
}
<ListPagination
pager={props.pager}
articlesCount={props.articlesCount}
currentPage={props.currentPage} />
</div>
);
};
export default ArticleList;