import React from "react"; import { Pane, Card, Paragraph, Heading } from "evergreen-ui"; import { Article } from "./proto/proto_pb"; export default function(props: any) { // deconstructing articles into a list and unwrap into aticle const articles = props.articles; const listArticles = articles.map((article: Article) => ( {article.getTitle()} {article.getBody()} )); // render a pane with the articles return {articles.length > 0 ? listArticles : "No items"}; }