1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

comment date

This commit is contained in:
Fedor Katurov 2019-10-15 14:49:06 +07:00
parent caeb464bb2
commit 6ebdd62f67
2 changed files with 11 additions and 3 deletions

View file

@ -1,7 +1,7 @@
import React, { FC, useMemo } from 'react';
import { IComment, IFile } from '~/redux/types';
import path from 'ramda/es/path';
import { formatCommentText, getURL } from '~/utils/dom';
import { formatCommentText, getURL, getPrettyDate } from '~/utils/dom';
import { Group } from '~/components/containers/Group';
import * as styles from './styles.scss';
import { UPLOAD_TYPES } from '~/redux/uploads/constants';
@ -36,6 +36,8 @@ const CommentContent: FC<IProps> = ({ comment }) => {
__html: formatCommentText(path(['user', 'username'], comment), comment.text),
}}
/>
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>
</div>
)}
@ -48,6 +50,8 @@ const CommentContent: FC<IProps> = ({ comment }) => {
</div>
))}
</div>
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>
</div>
)}
@ -56,6 +60,8 @@ const CommentContent: FC<IProps> = ({ comment }) => {
{groupped.audio.map(file => (
<div className={classnames(styles.block, styles.audio_block)} key={file.id}>
<AudioPlayer file={file} />
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>
</div>
))}
</>
@ -71,7 +77,6 @@ export { CommentContent };
)}
<div className={styles.date}>{getPrettyDate(comment.created_at)}</div>