diff options
author | Vitaly Takmazov | 2018-08-28 16:06:30 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:53 +0300 |
commit | 1068ba623d2f8b6f7e89f5a4db2c9a54f20a26f0 (patch) | |
tree | 4b2402c1d718584449535acade8235a262c9a934 /vnext/src/components/Thread.js | |
parent | 7e08830d9ed55e77d7242106dcd1c3dd5bc4488b (diff) |
React.Fragment short syntax (requires babel 7)
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r-- | vnext/src/components/Thread.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js index b426581d..23654d86 100644 --- a/vnext/src/components/Thread.js +++ b/vnext/src/components/Thread.js @@ -79,7 +79,7 @@ export default class Thread extends React.Component { const msg = this.state.msg; const loaders = Math.min(msg.replies || 0, 10); return ( - <React.Fragment> + <> <ul id="0"> <li className="msg msgthread"> { @@ -101,14 +101,14 @@ export default class Thread extends React.Component { <div className="msg-cont"> <div className="msg-header"> {!msg.user.banned ? ( - <React.Fragment> + <> <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} /> - </React.Fragment>) : ( - <React.Fragment> + </>) : ( + <> <span>[удалено]:</span><Avatar user={{ uid: 0 }} /> - </React.Fragment> + </> ) } <div className="msg-ts"> @@ -134,27 +134,27 @@ export default class Thread extends React.Component { <div className="msg-links"> { this.props.visitor.uid > 0 ? ( - <React.Fragment> + <> {this.state.active === msg.rid || <span style={linkStyle} onClick={() => this.setActive(msg)}>Reply</span>} {this.state.active === msg.rid && <MessageInput data={msg} onSend={this.postComment}>Write a comment...</MessageInput>} - </React.Fragment> + </> ) : ( - <React.Fragment> + <> <span> · </span>{this.state.active === msg.rid || <Button className="a-login">Reply</Button>} - </React.Fragment> + </> ) } </div> </div> </li> )) : ( - <React.Fragment> + <> {Array(loaders).fill().map((it, i) => <Spinner key={i} />)} - </React.Fragment> + </> ) } </ul> - </React.Fragment> + </> ); } } |