import * as React from 'react'; import Gravatar from 'react-gravatar'; import ILike from '../../interfaces/ILike'; import Spinner from '../shared/Spinner'; import { TitleText, DangerText, CenteredMutedText } from '../shared/CustomTexts'; interface Props { likes: Array; areLoading: boolean; error: string; } const LikeList = ({ likes, areLoading, error}: Props) => (
People who liked { areLoading ? : null } { error ? {error} : null }
{ likes.length === 0 ? There are no likes yet. : null } { likes.map((like, i) => (
{like.fullName}
)) }
); export default LikeList;