import Link from 'next/link'; import formatDate from 'date-fns/format' import { Author, AuthorImage, AuthorName, BlockLink, BlockMeta, BlockSubtitle, BlockTitle, PublishDate } from './style'; import { findByUsername } from 'lib/author'; const GuideBlock = ({ guide }) => { const author = findByUsername(guide.author) || {}; return (
{ guide.title } { guide.featuredDescription || guide.description } { author.name } { formatDate(new Date(guide.createdAt), 'MMMM d, yyyy') }
) }; export default GuideBlock;