import * as React from 'react'; import Gravatar from 'react-gravatar'; import I18n from 'i18n-js'; import { MutedText } from '../common/CustomTexts'; import friendlyDate from '../../helpers/datetime'; import Separator from '../common/Separator'; interface Props { createdAt: string; toggleEditMode(): void; handleDeletePost(): void; isPowerUser: boolean; authorEmail: string; authorFullName: string; currentUserEmail: string; } const PostFooter = ({ createdAt, toggleEditMode, handleDeletePost, isPowerUser, authorEmail, authorFullName, currentUserEmail, }: Props) => (
{ I18n.t('post.published_by').toLowerCase() }     {authorFullName}
{ isPowerUser || authorEmail === currentUserEmail ? <> { I18n.t('common.buttons.edit') } confirm(I18n.t('common.confirmation')) && handleDeletePost()}> { I18n.t('common.buttons.delete') } : null } {friendlyDate(createdAt)}
); export default PostFooter;