aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Thread.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r--vnext/src/components/Thread.js49
1 files changed, 20 insertions, 29 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js
index b0e73b40..2097a315 100644
--- a/vnext/src/components/Thread.js
+++ b/vnext/src/components/Thread.js
@@ -45,7 +45,7 @@ export default class Thread extends React.Component {
.then(response => {
let msg = response.data.shift();
this.setState({
- msg: {...msg},
+ msg: { ...msg },
replies: response.data,
loading: false,
active: 0
@@ -100,29 +100,20 @@ export default class Thread extends React.Component {
<li id={msg.rid} key={msg.rid} className="msg">
<div className="msg-cont">
<div className="msg-header">
- {!msg.user.banned ? (
- <>
- <span itemProp="author" itemScope="" itemType="http://schema.org/Person">
- <Link to={`/${msg.user.uname}/`} itemProp="url" rel="author"><span itemProp="name">{msg.user.uname}</span></Link>
- </span><Avatar user={msg.user} />
- </>) : (
- <>
- <span>[удалено]:</span><Avatar user={{ uid: 0 }} />
- </>
- )
- }
- <div className="msg-ts">
- <a href={`/${msg.user.uname}/${msg.mid}`}>
- <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={msg.timestamp}
- title={moment.utc(msg.timestamp).local().format('lll')}>
- {moment.utc(msg.timestamp).fromNow()}
- </time>
- </a>
- {msg.replyto > 0 &&
- (
- <a href={`#${msg.replyto}`}> in reply to {msg.to.uname}&nbsp;</a>
- )}
- </div>
+ <Avatar user={msg.user}>
+ <div className="msg-ts">
+ <a href={`/${msg.user.uname}/${msg.mid}`}>
+ <time itemProp="datePublished dateModified" itemType="http://schema.org/Date" dateTime={msg.timestamp}
+ title={moment.utc(msg.timestamp).local().format('lll')}>
+ {moment.utc(msg.timestamp).fromNow()}
+ </time>
+ </a>
+ {msg.replyto > 0 &&
+ (
+ <a href={`#${msg.replyto}`}> in reply to {msg.to.uname}&nbsp;</a>
+ )}
+ </div>
+ </Avatar>
</div>
<div className="msg-txt"><p dangerouslySetInnerHTML={{ __html: format(msg.body, msg.mid, (msg.tags || []).indexOf('code') >= 0) }}></p></div>
{
@@ -149,10 +140,10 @@ export default class Thread extends React.Component {
</li>
)) : (
<>
- {Array(loaders).fill().map((it, i) => <Spinner key={i} />)}
- </>
- )
- }
+ {Array(loaders).fill().map((it, i) => <Spinner key={i} />)}
+ </>
+ )
+ }
</ul>
</>
);
@@ -170,7 +161,7 @@ Thread.propTypes = {
visitor: UserType.isRequired
};
-function Recommendations({forMessage, ...rest}) {
+function Recommendations({ forMessage, ...rest }) {
const { likes, recommendations } = forMessage;
return recommendations && recommendations.length > 0 && (
<div className="msg-recomms">{'Recommended by '}