import formatDate from 'date-fns/format'; import { Author, AuthorImage, AuthorName, BlockLink, BlockMeta, BlockSubtitle, BlockTitle, PublishDate } from './style'; import { findByUsername } from 'lib/author'; const FeaturedGuide = ({ 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 FeaturedGuide;