fix: use the history.push instead of link to reply page (#509)

* fix: some reply has null tags

* fix: use the history.push instead of link to reply page

* fix: use the history.push instead of link to reply page
This commit is contained in:
Nekotoxin 2022-05-05 21:19:07 +08:00 committed by GitHub
parent 370de5b9c4
commit 0937908930
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -298,7 +298,6 @@ class ReplyBox extends React.Component {
</div>
<div style={{ marginLeft: isChild ? "48px" : "60px" }}>
<div className="fr">
<Link to={`/r/${reply.id}`} style={{cursor: "default", textDecoration: "none"}} />
{this.props.account !== null && this.props.account !== undefined && this.props.account.id !== reply?.author ? (
reply?.thanksStatus === false ? (
<div id={`thank_area__${reply.id}`} className="thank_area" style={{ marginRight: "10px" }}>
@ -345,7 +344,11 @@ class ReplyBox extends React.Component {
<img src={Setting.getStatic("/img/reply_neue.png")} align="absmiddle" border="0" alt="Reply" width="20" />
</a>
) : null}
{isChild ? null : <span className={`no ${this.props.topic.nodeId}`}>{no + 1}</span>}
{isChild ? null : (
<span className={`no ${this.props.topic.nodeId}`} onClick={() => this.props.history.push(`/r/${reply.id}`)}>
{no + 1}
</span>
)}
</div>
<strong>
<UserLink username={reply.author} classNameText={"dark"} />