import * as React from 'react'; import I18n from 'i18n-js'; import Gravatar from 'react-gravatar'; import ILike from '../../interfaces/ILike'; import Spinner from '../shared/Spinner'; import { BoxTitleText, DangerText, CenteredMutedText } from '../shared/CustomTexts'; interface Props { likes: Array; areLoading: boolean; error: string; } const LikeList = ({ likes, areLoading, error}: Props) => (
{I18n.t('post.likes_box.title')} { areLoading ? : null } { error ? {error} : null }
{ likes.length === 0 ? {I18n.t('post.likes_box.empty')} : null } { likes.map((like, i) => (
{like.fullName}
)) }
); export default LikeList;