|
@ -2,7 +2,7 @@ import React, { |
|
|
memo, useEffect, useMemo, useState, |
|
|
memo, useEffect, useMemo, useState, |
|
|
} from 'react'; |
|
|
} from 'react'; |
|
|
import { |
|
|
import { |
|
|
Dimmer, Grid, Image, List, Placeholder, |
|
|
Dimmer, Icon, Image, Feed, Placeholder, |
|
|
} from 'semantic-ui-react'; |
|
|
} from 'semantic-ui-react'; |
|
|
import PropTypes from 'prop-types'; |
|
|
import PropTypes from 'prop-types'; |
|
|
import { useTranslation } from 'react-i18next'; |
|
|
import { useTranslation } from 'react-i18next'; |
|
@ -88,17 +88,17 @@ const PostListRow = (props) => { |
|
|
}, [postAuthorAddress, users]); |
|
|
}, [postAuthorAddress, users]); |
|
|
|
|
|
|
|
|
return useMemo(() => ( |
|
|
return useMemo(() => ( |
|
|
<Dimmer.Dimmable as={List.Item} blurring dimmed={loading} className="list-item"> |
|
|
<Dimmer.Dimmable as={Feed.Event} blurring dimmed={loading}> |
|
|
|
|
|
<Feed.Label className="post-profile-picture"> |
|
|
{postAuthorMeta !== null && postAuthorMeta[PROFILE_PICTURE] |
|
|
{postAuthorMeta !== null && postAuthorMeta[PROFILE_PICTURE] |
|
|
? ( |
|
|
? ( |
|
|
<Image |
|
|
<Image |
|
|
className="profile-picture" |
|
|
|
|
|
avatar |
|
|
avatar |
|
|
src={postAuthorMeta[PROFILE_PICTURE]} |
|
|
src={postAuthorMeta[PROFILE_PICTURE]} |
|
|
/> |
|
|
/> |
|
|
) |
|
|
) |
|
|
: ( |
|
|
: ( |
|
|
<List.Icon |
|
|
<Icon |
|
|
name="user circle" |
|
|
name="user circle" |
|
|
size="big" |
|
|
size="big" |
|
|
inverted |
|
|
inverted |
|
@ -106,34 +106,32 @@ const PostListRow = (props) => { |
|
|
verticalAlign="middle" |
|
|
verticalAlign="middle" |
|
|
/> |
|
|
/> |
|
|
)} |
|
|
)} |
|
|
<List.Content className="list-content"> |
|
|
</Feed.Label> |
|
|
<List.Header> |
|
|
<Feed.Content> |
|
|
<Grid> |
|
|
<Feed.Summary> |
|
|
<Grid.Column floated="left" width={14}> |
|
|
<div> |
|
|
{postSubject !== null |
|
|
{postSubject !== null |
|
|
? postSubject |
|
|
? postSubject |
|
|
: <Placeholder><Placeholder.Line length="very long" /></Placeholder>} |
|
|
: <Placeholder><Placeholder.Line length="very long" /></Placeholder>} |
|
|
</Grid.Column> |
|
|
<span className="post-summary-meta-index"> |
|
|
<Grid.Column floated="right" width={2} textAlign="right"> |
|
|
|
|
|
<span className="post-metadata"> |
|
|
|
|
|
{t('post.list.row.post.id', { id: postId })} |
|
|
{t('post.list.row.post.id', { id: postId })} |
|
|
</span> |
|
|
</span> |
|
|
</Grid.Column> |
|
|
</div> |
|
|
</Grid> |
|
|
|
|
|
</List.Header> |
|
|
|
|
|
<List.Description> |
|
|
|
|
|
<Grid verticalAlign="middle"> |
|
|
|
|
|
<Grid.Column floated="left" width={14}> |
|
|
|
|
|
{postAuthor !== null && timeAgo !== null |
|
|
{postAuthor !== null && timeAgo !== null |
|
|
? t('post.list.row.author.date', { author: postAuthor, timeAgo }) |
|
|
? ( |
|
|
: <Placeholder><Placeholder.Line length="long" /></Placeholder>} |
|
|
<> |
|
|
</Grid.Column> |
|
|
{t('post.list.row.author.pre')} |
|
|
</Grid> |
|
|
|
|
|
</List.Description> |
|
|
<Feed.User>{postAuthor}</Feed.User> |
|
|
</List.Content> |
|
|
<Feed.Date className="post-summary-meta-date">{timeAgo}</Feed.Date> |
|
|
<List.Content> |
|
|
</> |
|
|
|
|
|
) |
|
|
|
|
|
: <Placeholder><Placeholder.Line length="medium" /></Placeholder>} |
|
|
|
|
|
</Feed.Summary> |
|
|
|
|
|
<Feed.Extra> |
|
|
{postMessage} |
|
|
{postMessage} |
|
|
</List.Content> |
|
|
</Feed.Extra> |
|
|
|
|
|
</Feed.Content> |
|
|
</Dimmer.Dimmable> |
|
|
</Dimmer.Dimmable> |
|
|
), [loading, postAuthor, postAuthorMeta, postId, postMessage, postSubject, t, timeAgo]); |
|
|
), [loading, postAuthor, postAuthorMeta, postId, postMessage, postSubject, t, timeAgo]); |
|
|
}; |
|
|
}; |
|
|